{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 122,
   "id": "e4a15fed-4be1-45f3-953c-9e3b51776072",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd  # 导入库\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 123,
   "id": "41cd4680-3c87-4a35-953c-c2d63b4aa185",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<module 'ntpath' from 'C:\\\\Users\\\\HP\\\\AppData\\\\Roaming\\\\spsspro\\\\spsspro\\\\lib\\\\python\\\\lib\\\\ntpath.py'>"
      ]
     },
     "execution_count": 123,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import os\n",
    "os.path\n",
    "# C:\\Users\\HP\\AppData\\Roaming\\spsspro"
   ]
  },
  {
   "cell_type": "raw",
   "id": "7b7d5c0b-e185-425c-9d0a-f09bb8429da9",
   "metadata": {},
   "source": [
    "问题1.1: 对这些玻璃文物的表面风化与其玻璃类型、纹饰和颜色的关系进行分析；"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 124,
   "id": "d71329fc-b712-49ca-b29c-2d799b022600",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>文物编号</th>\n",
       "      <th>纹饰</th>\n",
       "      <th>类型</th>\n",
       "      <th>颜色</th>\n",
       "      <th>表面风化</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>C</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>无风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>A</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>无风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>A</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>无风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>A</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>无风化</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   文物编号 纹饰  类型  颜色 表面风化\n",
       "0     1  C  高钾  蓝绿  无风化\n",
       "1     2  A  铅钡  浅蓝   风化\n",
       "2     3  A  高钾  蓝绿  无风化\n",
       "3     4  A  高钾  蓝绿  无风化\n",
       "4     5  A  高钾  蓝绿  无风化"
      ]
     },
     "execution_count": 124,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = pd.read_excel('附件.xlsx', sheet_name='表单1')\n",
    "data.head()  # 读取表单1前面"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 125,
   "id": "e9bd0e75-c04e-4879-8ce5-3d2d6809eb1c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['文物编号', '纹饰', '类型', '颜色', '表面风化'], dtype='object')"
      ]
     },
     "execution_count": 125,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 126,
   "id": "168fc2c2-cd29-4ced-b856-c32e58c5683c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>文物编号</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>58.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>29.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>16.886879</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>15.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>29.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>43.750000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>58.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            文物编号\n",
       "count  58.000000\n",
       "mean   29.500000\n",
       "std    16.886879\n",
       "min     1.000000\n",
       "25%    15.250000\n",
       "50%    29.500000\n",
       "75%    43.750000\n",
       "max    58.000000"
      ]
     },
     "execution_count": 126,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 127,
   "id": "859ecf92-9e57-4eb1-a74b-7f8d79ae82c6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "文物编号    0\n",
       "纹饰      0\n",
       "类型      0\n",
       "颜色      4\n",
       "表面风化    0\n",
       "dtype: int64"
      ]
     },
     "execution_count": 127,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.isnull().sum()  # 找是否存在缺失值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "id": "de1b3864-ee98-45cd-948a-d73d7a95e33b",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 颜色存在四个缺失值 将其删掉 输出到新的csv文件里进行分析\n",
    "data.dropna().to_csv('1.1.csv', index=None)"
   ]
  },
  {
   "cell_type": "raw",
   "id": "8a0777ae-d35f-4035-8a6c-5fa9b7c16a8a",
   "metadata": {},
   "source": [
    "相关性分析:\n",
    "变量X:{纹饰，类型，颜色，表面风化}；相关类型:{Spearman相关系数}\n",
    "https://www.spsspro.com/analysis/operation/2432024?name=1.1.csv&project_id=1239374\n",
    "\n",
    "卡方检验分析:(差异性分析)\n",
    "变量X:{纹饰}；变量Y:{类型，颜色，表面风化}\n",
    "https://www.spsspro.com/s/29ed32a8100e4cee8eb68272ea7153e6\n",
    "\n",
    "变量X:{类型}；变量Y:{颜色，表面风化}\n",
    "\n",
    "变量X:{颜色}；变量Y:{表面风化}"
   ]
  },
  {
   "cell_type": "raw",
   "id": "897afb80-9c14-4968-9686-dec6bafc2018",
   "metadata": {},
   "source": [
    "问题1.2:结合玻璃的类型，分析文物样品表面有无风化化学成分含量的统计规律\n",
    "表单1和表单2进行分类汇总"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 129,
   "id": "02c942f6-7df5-4c84-95f2-00f36c89838f",
   "metadata": {},
   "outputs": [],
   "source": [
    "data2 = pd.read_excel('附件.xlsx', sheet_name='表单2')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 130,
   "id": "61add10f-fa15-423f-ad2a-2a6a15e20df1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>文物采样点</th>\n",
       "      <th>二氧化硅(SiO2)</th>\n",
       "      <th>氧化钠(Na2O)</th>\n",
       "      <th>氧化钾(K2O)</th>\n",
       "      <th>氧化钙(CaO)</th>\n",
       "      <th>氧化镁(MgO)</th>\n",
       "      <th>氧化铝(Al2O3)</th>\n",
       "      <th>氧化铁(Fe2O3)</th>\n",
       "      <th>氧化铜(CuO)</th>\n",
       "      <th>氧化铅(PbO)</th>\n",
       "      <th>氧化钡(BaO)</th>\n",
       "      <th>五氧化二磷(P2O5)</th>\n",
       "      <th>氧化锶(SrO)</th>\n",
       "      <th>氧化锡(SnO2)</th>\n",
       "      <th>二氧化硫(SO2)</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>01</td>\n",
       "      <td>69.33</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9.99</td>\n",
       "      <td>6.32</td>\n",
       "      <td>0.87</td>\n",
       "      <td>3.93</td>\n",
       "      <td>1.74</td>\n",
       "      <td>3.87</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.17</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>02</td>\n",
       "      <td>36.28</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.05</td>\n",
       "      <td>2.34</td>\n",
       "      <td>1.18</td>\n",
       "      <td>5.73</td>\n",
       "      <td>1.86</td>\n",
       "      <td>0.26</td>\n",
       "      <td>47.43</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.57</td>\n",
       "      <td>0.19</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>03部位1</td>\n",
       "      <td>87.05</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5.19</td>\n",
       "      <td>2.01</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.06</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.78</td>\n",
       "      <td>0.25</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.66</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>03部位2</td>\n",
       "      <td>61.71</td>\n",
       "      <td>NaN</td>\n",
       "      <td>12.37</td>\n",
       "      <td>5.87</td>\n",
       "      <td>1.11</td>\n",
       "      <td>5.50</td>\n",
       "      <td>2.16</td>\n",
       "      <td>5.09</td>\n",
       "      <td>1.41</td>\n",
       "      <td>2.86</td>\n",
       "      <td>0.70</td>\n",
       "      <td>0.10</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>04</td>\n",
       "      <td>65.88</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9.67</td>\n",
       "      <td>7.12</td>\n",
       "      <td>1.56</td>\n",
       "      <td>6.44</td>\n",
       "      <td>2.06</td>\n",
       "      <td>2.18</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.79</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>64</th>\n",
       "      <td>54严重风化点</td>\n",
       "      <td>17.11</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.11</td>\n",
       "      <td>3.65</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.34</td>\n",
       "      <td>58.46</td>\n",
       "      <td>NaN</td>\n",
       "      <td>14.13</td>\n",
       "      <td>1.12</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65</th>\n",
       "      <td>55</td>\n",
       "      <td>49.01</td>\n",
       "      <td>2.71</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.13</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.45</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.86</td>\n",
       "      <td>32.92</td>\n",
       "      <td>7.95</td>\n",
       "      <td>0.35</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>66</th>\n",
       "      <td>56</td>\n",
       "      <td>29.15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.21</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.85</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.79</td>\n",
       "      <td>41.25</td>\n",
       "      <td>15.45</td>\n",
       "      <td>2.54</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>67</th>\n",
       "      <td>57</td>\n",
       "      <td>25.42</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.31</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.18</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.16</td>\n",
       "      <td>45.10</td>\n",
       "      <td>17.30</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>68</th>\n",
       "      <td>58</td>\n",
       "      <td>30.39</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.34</td>\n",
       "      <td>3.49</td>\n",
       "      <td>0.79</td>\n",
       "      <td>3.52</td>\n",
       "      <td>0.86</td>\n",
       "      <td>3.13</td>\n",
       "      <td>39.35</td>\n",
       "      <td>7.66</td>\n",
       "      <td>8.99</td>\n",
       "      <td>0.24</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>69 rows × 15 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      文物采样点  二氧化硅(SiO2)  氧化钠(Na2O)  氧化钾(K2O)  氧化钙(CaO)  氧化镁(MgO)  氧化铝(Al2O3)  \\\n",
       "0        01       69.33        NaN      9.99      6.32      0.87        3.93   \n",
       "1        02       36.28        NaN      1.05      2.34      1.18        5.73   \n",
       "2     03部位1       87.05        NaN      5.19      2.01       NaN        4.06   \n",
       "3     03部位2       61.71        NaN     12.37      5.87      1.11        5.50   \n",
       "4        04       65.88        NaN      9.67      7.12      1.56        6.44   \n",
       "..      ...         ...        ...       ...       ...       ...         ...   \n",
       "64  54严重风化点       17.11        NaN       NaN       NaN      1.11        3.65   \n",
       "65       55       49.01       2.71       NaN      1.13       NaN        1.45   \n",
       "66       56       29.15        NaN       NaN      1.21       NaN        1.85   \n",
       "67       57       25.42        NaN       NaN      1.31       NaN        2.18   \n",
       "68       58       30.39        NaN      0.34      3.49      0.79        3.52   \n",
       "\n",
       "    氧化铁(Fe2O3)  氧化铜(CuO)  氧化铅(PbO)  氧化钡(BaO)  五氧化二磷(P2O5)  氧化锶(SrO)  \\\n",
       "0         1.74      3.87       NaN       NaN         1.17       NaN   \n",
       "1         1.86      0.26     47.43       NaN         3.57      0.19   \n",
       "2          NaN      0.78      0.25       NaN         0.66       NaN   \n",
       "3         2.16      5.09      1.41      2.86         0.70      0.10   \n",
       "4         2.06      2.18       NaN       NaN         0.79       NaN   \n",
       "..         ...       ...       ...       ...          ...       ...   \n",
       "64         NaN      1.34     58.46       NaN        14.13      1.12   \n",
       "65         NaN      0.86     32.92      7.95         0.35       NaN   \n",
       "66         NaN      0.79     41.25     15.45         2.54       NaN   \n",
       "67         NaN      1.16     45.10     17.30          NaN       NaN   \n",
       "68        0.86      3.13     39.35      7.66         8.99      0.24   \n",
       "\n",
       "    氧化锡(SnO2)  二氧化硫(SO2)  \n",
       "0         NaN       0.39  \n",
       "1         NaN        NaN  \n",
       "2         NaN        NaN  \n",
       "3         NaN        NaN  \n",
       "4         NaN       0.36  \n",
       "..        ...        ...  \n",
       "64        NaN        NaN  \n",
       "65        NaN        NaN  \n",
       "66        NaN        NaN  \n",
       "67        NaN        NaN  \n",
       "68        NaN        NaN  \n",
       "\n",
       "[69 rows x 15 columns]"
      ]
     },
     "execution_count": 130,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 131,
   "id": "ac7e782c-19a2-47ce-882b-c64a913e39e2",
   "metadata": {},
   "outputs": [],
   "source": [
    "data2['文物编号'] = data2['文物采样点'].apply(lambda x:int(str(x)[:2]))  # 把文物采样点中的前两个关键字提取出来放在编号列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "id": "fdbb84d2-752c-4965-a626-36d255e08fb7",
   "metadata": {},
   "outputs": [],
   "source": [
    "data['颜色'].fillna(data['颜色'].mode()[0],inplace=True)  # 颜色存在缺失值 用中位数填充"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 133,
   "id": "8d039639-492e-4894-800a-37aa9329f6d2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "文物采样点           0\n",
       "二氧化硅(SiO2)      0\n",
       "氧化钠(Na2O)      50\n",
       "氧化钾(K2O)       28\n",
       "氧化钙(CaO)        8\n",
       "氧化镁(MgO)       25\n",
       "氧化铝(Al2O3)      1\n",
       "氧化铁(Fe2O3)     24\n",
       "氧化铜(CuO)        5\n",
       "氧化铅(PbO)       11\n",
       "氧化钡(BaO)       16\n",
       "五氧化二磷(P2O5)    10\n",
       "氧化锶(SrO)       23\n",
       "氧化锡(SnO2)      62\n",
       "二氧化硫(SO2)      61\n",
       "文物编号            0\n",
       "dtype: int64"
      ]
     },
     "execution_count": 133,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data2.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "id": "b8010690-409a-4fd3-81d0-76af57f28431",
   "metadata": {},
   "outputs": [],
   "source": [
    "data2.fillna(0, inplace=True)  # 缺失处也就是空白处 直接标为0即可"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 135,
   "id": "ba124ed4-c1f6-419d-9632-578fd10cc36b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "文物采样点          0\n",
       "二氧化硅(SiO2)     0\n",
       "氧化钠(Na2O)      0\n",
       "氧化钾(K2O)       0\n",
       "氧化钙(CaO)       0\n",
       "氧化镁(MgO)       0\n",
       "氧化铝(Al2O3)     0\n",
       "氧化铁(Fe2O3)     0\n",
       "氧化铜(CuO)       0\n",
       "氧化铅(PbO)       0\n",
       "氧化钡(BaO)       0\n",
       "五氧化二磷(P2O5)    0\n",
       "氧化锶(SrO)       0\n",
       "氧化锡(SnO2)      0\n",
       "二氧化硫(SO2)      0\n",
       "文物编号           0\n",
       "dtype: int64"
      ]
     },
     "execution_count": 135,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data2.isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 136,
   "id": "ffbaba5d-eb0d-4afb-9894-7c9be6dc0f6c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>文物编号</th>\n",
       "      <th>纹饰</th>\n",
       "      <th>类型</th>\n",
       "      <th>颜色</th>\n",
       "      <th>表面风化</th>\n",
       "      <th>文物采样点</th>\n",
       "      <th>二氧化硅(SiO2)</th>\n",
       "      <th>氧化钠(Na2O)</th>\n",
       "      <th>氧化钾(K2O)</th>\n",
       "      <th>氧化钙(CaO)</th>\n",
       "      <th>氧化镁(MgO)</th>\n",
       "      <th>氧化铝(Al2O3)</th>\n",
       "      <th>氧化铁(Fe2O3)</th>\n",
       "      <th>氧化铜(CuO)</th>\n",
       "      <th>氧化铅(PbO)</th>\n",
       "      <th>氧化钡(BaO)</th>\n",
       "      <th>五氧化二磷(P2O5)</th>\n",
       "      <th>氧化锶(SrO)</th>\n",
       "      <th>氧化锡(SnO2)</th>\n",
       "      <th>二氧化硫(SO2)</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>C</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>无风化</td>\n",
       "      <td>01</td>\n",
       "      <td>69.33</td>\n",
       "      <td>0.00</td>\n",
       "      <td>9.99</td>\n",
       "      <td>6.32</td>\n",
       "      <td>0.87</td>\n",
       "      <td>3.93</td>\n",
       "      <td>1.74</td>\n",
       "      <td>3.87</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.17</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>02</td>\n",
       "      <td>36.28</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.05</td>\n",
       "      <td>2.34</td>\n",
       "      <td>1.18</td>\n",
       "      <td>5.73</td>\n",
       "      <td>1.86</td>\n",
       "      <td>0.26</td>\n",
       "      <td>47.43</td>\n",
       "      <td>0.00</td>\n",
       "      <td>3.57</td>\n",
       "      <td>0.19</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>A</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>无风化</td>\n",
       "      <td>03部位1</td>\n",
       "      <td>87.05</td>\n",
       "      <td>0.00</td>\n",
       "      <td>5.19</td>\n",
       "      <td>2.01</td>\n",
       "      <td>0.00</td>\n",
       "      <td>4.06</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.78</td>\n",
       "      <td>0.25</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.66</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>A</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>无风化</td>\n",
       "      <td>03部位2</td>\n",
       "      <td>61.71</td>\n",
       "      <td>0.00</td>\n",
       "      <td>12.37</td>\n",
       "      <td>5.87</td>\n",
       "      <td>1.11</td>\n",
       "      <td>5.50</td>\n",
       "      <td>2.16</td>\n",
       "      <td>5.09</td>\n",
       "      <td>1.41</td>\n",
       "      <td>2.86</td>\n",
       "      <td>0.70</td>\n",
       "      <td>0.10</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>A</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>无风化</td>\n",
       "      <td>04</td>\n",
       "      <td>65.88</td>\n",
       "      <td>0.00</td>\n",
       "      <td>9.67</td>\n",
       "      <td>7.12</td>\n",
       "      <td>1.56</td>\n",
       "      <td>6.44</td>\n",
       "      <td>2.06</td>\n",
       "      <td>2.18</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.79</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>64</th>\n",
       "      <td>54</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>54严重风化点</td>\n",
       "      <td>17.11</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.11</td>\n",
       "      <td>3.65</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.34</td>\n",
       "      <td>58.46</td>\n",
       "      <td>0.00</td>\n",
       "      <td>14.13</td>\n",
       "      <td>1.12</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65</th>\n",
       "      <td>55</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>绿</td>\n",
       "      <td>无风化</td>\n",
       "      <td>55</td>\n",
       "      <td>49.01</td>\n",
       "      <td>2.71</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.13</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.45</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.86</td>\n",
       "      <td>32.92</td>\n",
       "      <td>7.95</td>\n",
       "      <td>0.35</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>66</th>\n",
       "      <td>56</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>56</td>\n",
       "      <td>29.15</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.21</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.85</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.79</td>\n",
       "      <td>41.25</td>\n",
       "      <td>15.45</td>\n",
       "      <td>2.54</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>67</th>\n",
       "      <td>57</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>57</td>\n",
       "      <td>25.42</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.31</td>\n",
       "      <td>0.00</td>\n",
       "      <td>2.18</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.16</td>\n",
       "      <td>45.10</td>\n",
       "      <td>17.30</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>68</th>\n",
       "      <td>58</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>58</td>\n",
       "      <td>30.39</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.34</td>\n",
       "      <td>3.49</td>\n",
       "      <td>0.79</td>\n",
       "      <td>3.52</td>\n",
       "      <td>0.86</td>\n",
       "      <td>3.13</td>\n",
       "      <td>39.35</td>\n",
       "      <td>7.66</td>\n",
       "      <td>8.99</td>\n",
       "      <td>0.24</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>69 rows × 20 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    文物编号 纹饰  类型  颜色 表面风化    文物采样点  二氧化硅(SiO2)  氧化钠(Na2O)  氧化钾(K2O)  氧化钙(CaO)  \\\n",
       "0      1  C  高钾  蓝绿  无风化       01       69.33       0.00      9.99      6.32   \n",
       "1      2  A  铅钡  浅蓝   风化       02       36.28       0.00      1.05      2.34   \n",
       "2      3  A  高钾  蓝绿  无风化    03部位1       87.05       0.00      5.19      2.01   \n",
       "3      3  A  高钾  蓝绿  无风化    03部位2       61.71       0.00     12.37      5.87   \n",
       "4      4  A  高钾  蓝绿  无风化       04       65.88       0.00      9.67      7.12   \n",
       "..   ... ..  ..  ..  ...      ...         ...        ...       ...       ...   \n",
       "64    54  C  铅钡  浅蓝   风化  54严重风化点       17.11       0.00      0.00      0.00   \n",
       "65    55  C  铅钡   绿  无风化       55       49.01       2.71      0.00      1.13   \n",
       "66    56  C  铅钡  蓝绿   风化       56       29.15       0.00      0.00      1.21   \n",
       "67    57  C  铅钡  蓝绿   风化       57       25.42       0.00      0.00      1.31   \n",
       "68    58  C  铅钡  浅蓝   风化       58       30.39       0.00      0.34      3.49   \n",
       "\n",
       "    氧化镁(MgO)  氧化铝(Al2O3)  氧化铁(Fe2O3)  氧化铜(CuO)  氧化铅(PbO)  氧化钡(BaO)  \\\n",
       "0       0.87        3.93        1.74      3.87      0.00      0.00   \n",
       "1       1.18        5.73        1.86      0.26     47.43      0.00   \n",
       "2       0.00        4.06        0.00      0.78      0.25      0.00   \n",
       "3       1.11        5.50        2.16      5.09      1.41      2.86   \n",
       "4       1.56        6.44        2.06      2.18      0.00      0.00   \n",
       "..       ...         ...         ...       ...       ...       ...   \n",
       "64      1.11        3.65        0.00      1.34     58.46      0.00   \n",
       "65      0.00        1.45        0.00      0.86     32.92      7.95   \n",
       "66      0.00        1.85        0.00      0.79     41.25     15.45   \n",
       "67      0.00        2.18        0.00      1.16     45.10     17.30   \n",
       "68      0.79        3.52        0.86      3.13     39.35      7.66   \n",
       "\n",
       "    五氧化二磷(P2O5)  氧化锶(SrO)  氧化锡(SnO2)  二氧化硫(SO2)  \n",
       "0          1.17      0.00        0.0       0.39  \n",
       "1          3.57      0.19        0.0       0.00  \n",
       "2          0.66      0.00        0.0       0.00  \n",
       "3          0.70      0.10        0.0       0.00  \n",
       "4          0.79      0.00        0.0       0.36  \n",
       "..          ...       ...        ...        ...  \n",
       "64        14.13      1.12        0.0       0.00  \n",
       "65         0.35      0.00        0.0       0.00  \n",
       "66         2.54      0.00        0.0       0.00  \n",
       "67         0.00      0.00        0.0       0.00  \n",
       "68         8.99      0.24        0.0       0.00  \n",
       "\n",
       "[69 rows x 20 columns]"
      ]
     },
     "execution_count": 136,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 表单1和表单2进行合并 从'文物编号'开始\n",
    "data_merge = pd.merge(data, data2, on='文物编号')\n",
    "data_merge"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 137,
   "id": "99187cdf-560d-460d-a716-33a48d441b4c",
   "metadata": {},
   "outputs": [],
   "source": [
    "data_merge.to_csv('1.2.csv', index=None)"
   ]
  },
  {
   "cell_type": "raw",
   "id": "3620a7b4-a1c8-4cf3-896a-35da6591d131",
   "metadata": {},
   "source": [
    "描述性分析:分类汇总\n",
    "类型、表面风化  -- 化合物含量\n",
    "https://www.spsspro.com/s/c9364a5f0ce64bbbb64fbfb35b1b0f17\n",
    "\n",
    "算法：\n",
    "分类汇总\n",
    "\n",
    "变量：\n",
    "分组变量:{类型，表面风化}；汇总变量:{二氧化硅(SiO2)，氧化钠(Na2O)，氧化钾(K2O)，氧化钙(CaO)，氧化镁(MgO)，氧化铝(Al2O3)，氧化铁(Fe2O3)，氧化铜(CuO)，氧化铅(PbO)，氧化钡(BaO)，五氧化二磷(P2O5)，氧化锶(SrO)，氧化锡(SnO2)，二氧化硫(SO2)}收起 \n",
    "\n",
    "参数：\n",
    "汇总类型:{均值，中位数，标准差，最大值，最小值}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "id": "51c50f47-fc84-4962-ae41-33f986dbb7bd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['文物编号', '纹饰', '类型', '颜色', '表面风化', '文物采样点', '二氧化硅(SiO2)', '氧化钠(Na2O)',\n",
       "       '氧化钾(K2O)', '氧化钙(CaO)', '氧化镁(MgO)', '氧化铝(Al2O3)', '氧化铁(Fe2O3)',\n",
       "       '氧化铜(CuO)', '氧化铅(PbO)', '氧化钡(BaO)', '五氧化二磷(P2O5)', '氧化锶(SrO)',\n",
       "       '氧化锡(SnO2)', '二氧化硫(SO2)'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 138,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_merge.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "id": "2f11051c-d2b1-409c-87f5-aba4e4defbfc",
   "metadata": {},
   "outputs": [],
   "source": [
    "# sum进行累加\n",
    "data_merge['sum'] = 0\n",
    "for i in ['二氧化硅(SiO2)', '氧化钠(Na2O)',\n",
    "       '氧化钾(K2O)', '氧化钙(CaO)', '氧化镁(MgO)', '氧化铝(Al2O3)', '氧化铁(Fe2O3)',\n",
    "       '氧化铜(CuO)', '氧化铅(PbO)', '氧化钡(BaO)', '五氧化二磷(P2O5)', '氧化锶(SrO)',\n",
    "       '氧化锡(SnO2)', '二氧化硫(SO2)']:\n",
    "    data_merge['sum'] += data_merge[i]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "id": "9c639956-bb9b-4e40-b4ab-012b70a8f99e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>文物编号</th>\n",
       "      <th>纹饰</th>\n",
       "      <th>类型</th>\n",
       "      <th>颜色</th>\n",
       "      <th>表面风化</th>\n",
       "      <th>文物采样点</th>\n",
       "      <th>二氧化硅(SiO2)</th>\n",
       "      <th>氧化钠(Na2O)</th>\n",
       "      <th>氧化钾(K2O)</th>\n",
       "      <th>氧化钙(CaO)</th>\n",
       "      <th>...</th>\n",
       "      <th>氧化铝(Al2O3)</th>\n",
       "      <th>氧化铁(Fe2O3)</th>\n",
       "      <th>氧化铜(CuO)</th>\n",
       "      <th>氧化铅(PbO)</th>\n",
       "      <th>氧化钡(BaO)</th>\n",
       "      <th>五氧化二磷(P2O5)</th>\n",
       "      <th>氧化锶(SrO)</th>\n",
       "      <th>氧化锡(SnO2)</th>\n",
       "      <th>二氧化硫(SO2)</th>\n",
       "      <th>sum</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>15</td>\n",
       "      <td>C</td>\n",
       "      <td>高钾</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>无风化</td>\n",
       "      <td>15</td>\n",
       "      <td>61.87</td>\n",
       "      <td>3.21</td>\n",
       "      <td>7.44</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>3.15</td>\n",
       "      <td>1.04</td>\n",
       "      <td>1.29</td>\n",
       "      <td>0.19</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.26</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>79.47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>17</td>\n",
       "      <td>C</td>\n",
       "      <td>高钾</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>无风化</td>\n",
       "      <td>17</td>\n",
       "      <td>60.71</td>\n",
       "      <td>2.12</td>\n",
       "      <td>5.71</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.00</td>\n",
       "      <td>1.04</td>\n",
       "      <td>1.09</td>\n",
       "      <td>0.19</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.18</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>71.89</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2 rows × 21 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    文物编号 纹饰  类型  颜色 表面风化 文物采样点  二氧化硅(SiO2)  氧化钠(Na2O)  氧化钾(K2O)  氧化钙(CaO)  \\\n",
       "17    15  C  高钾  浅蓝  无风化    15       61.87       3.21      7.44       0.0   \n",
       "19    17  C  高钾  浅蓝  无风化    17       60.71       2.12      5.71       0.0   \n",
       "\n",
       "    ...  氧化铝(Al2O3)  氧化铁(Fe2O3)  氧化铜(CuO)  氧化铅(PbO)  氧化钡(BaO)  五氧化二磷(P2O5)  \\\n",
       "17  ...        3.15        1.04      1.29      0.19       0.0         0.26   \n",
       "19  ...        0.00        1.04      1.09      0.19       0.0         0.18   \n",
       "\n",
       "    氧化锶(SrO)  氧化锡(SnO2)  二氧化硫(SO2)    sum  \n",
       "17       0.0        0.0        0.0  79.47  \n",
       "19       0.0        0.0        0.0  71.89  \n",
       "\n",
       "[2 rows x 21 columns]"
      ]
     },
     "execution_count": 140,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 筛选数据 分析规律\n",
    "data_merge[(data_merge['sum'] < 85) | (data_merge['sum'] > 105)]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 141,
   "id": "fb4b0c96-9a33-4ccd-8cfa-1ac0a38a8eff",
   "metadata": {},
   "outputs": [],
   "source": [
    "data_merge = data_merge[(data_merge['sum'] >= 85) & (data_merge['sum'] <= 105)]  # 符合标准的值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 142,
   "id": "68cf2f46-22c2-4b7d-accd-7f229cafd528",
   "metadata": {},
   "outputs": [],
   "source": [
    "data_merge.reset_index(inplace=True, drop=True)  # 索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 143,
   "id": "14932df0-4dd5-45df-967f-0a118643a2ab",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "二氧化硅(SiO2)\n",
      "0.768\n",
      "从F检验的结果分析可以得到，显著性P值为0.000***，水平上呈现显著性, 拒绝回归系数为0的原假设， 因此模型基本满足要求\n",
      "对于变量共线性表现，变量 纹饰_A、纹饰_B、纹饰_C、类型_铅钡、类型_高钾、颜色_浅绿、颜色_浅蓝、颜色_深绿、颜色_深蓝、颜色_紫、颜色_绿、颜色_蓝绿、颜色_黑、表面风化_无风化、表面风化_风化 VIF值大于10， 存在共线关系，简易移除共线性的自变量或者进行岭回归或逐步回归。\n",
      "模型的公式如下:y=27.013+1.974*纹饰_A+40.86*纹饰_B+(-15.821)*纹饰_C+6.788*类型_铅钡+20.225*类型_高钾+16.834*颜色_浅绿+5.173*颜色_浅蓝+15.416*颜色_深绿+(-12.636)*颜色_深蓝+(-4.095)*颜色_紫+8.405*颜色_绿+1.477*颜色_蓝绿+(-3.563)*颜色_黑+22.625*表面风化_无风化+4.388*表面风化_风化\n",
      "\n",
      "氧化钠(Na2O)\n",
      "0.232\n",
      "从F检验的结果分析可以得到，显著性P值为0.153，水平上不呈现显著性, 不能拒绝回归系数为0的原假设, 模型无效。\n",
      "对于变量共线性表现，变量 纹饰_A、纹饰_B、纹饰_C、类型_铅钡、类型_高钾、颜色_浅绿、颜色_浅蓝、颜色_深绿、颜色_深蓝、颜色_紫、颜色_绿、颜色_蓝绿、颜色_黑、表面风化_无风化、表面风化_风化 VIF值大于10， 存在共线关系，简易移除共线性的自变量或者进行岭回归或逐步回归。\n",
      "模型的公式如下:y=0.269+1.038*纹饰_A+(-0.41)*纹饰_B+(-0.36)*纹饰_C+0.087*类型_铅钡+0.182*类型_高钾+(-0.057)*颜色_浅绿+0.392*颜色_浅蓝+0.822*颜色_深绿+(-1.34)*颜色_深蓝+(-0.204)*颜色_紫+2.8*颜色_绿+(-0.396)*颜色_蓝绿+(-1.749)*颜色_黑+(-0.086)*表面风化_无风化+0.355*表面风化_风化\n",
      "\n",
      "氧化钾(K2O)\n",
      "0.858\n",
      "从F检验的结果分析可以得到，显著性P值为0.000***，水平上呈现显著性, 拒绝回归系数为0的原假设， 因此模型基本满足要求\n",
      "对于变量共线性表现，变量 纹饰_A、纹饰_B、纹饰_C、类型_铅钡、类型_高钾、颜色_浅绿、颜色_浅蓝、颜色_深绿、颜色_深蓝、颜色_紫、颜色_绿、颜色_蓝绿、颜色_黑、表面风化_无风化、表面风化_风化 VIF值大于10， 存在共线关系，简易移除共线性的自变量或者进行岭回归或逐步回归。\n",
      "模型的公式如下:y=0.951+2.583*纹饰_A+(-5.029)*纹饰_B+3.397*纹饰_C+(-4.672)*类型_铅钡+5.623*类型_高钾+0.025*颜色_浅绿+0.761*颜色_浅蓝+0.26*颜色_深绿+0.719*颜色_深蓝+(-0.044)*颜色_紫+(-0.273)*颜色_绿+(-1.355)*颜色_蓝绿+0.859*颜色_黑+0.598*表面风化_无风化+0.353*表面风化_风化\n",
      "\n",
      "氧化钙(CaO)\n",
      "0.493\n",
      "从F检验的结果分析可以得到，显著性P值为0.000***，水平上呈现显著性, 拒绝回归系数为0的原假设， 因此模型基本满足要求\n",
      "对于变量共线性表现，变量 纹饰_A、纹饰_B、纹饰_C、类型_铅钡、类型_高钾、颜色_浅绿、颜色_浅蓝、颜色_深绿、颜色_深蓝、颜色_紫、颜色_绿、颜色_蓝绿、颜色_黑、表面风化_无风化、表面风化_风化 VIF值大于10， 存在共线关系，简易移除共线性的自变量或者进行岭回归或逐步回归。\n",
      "模型的公式如下:y=0.907+1.159*纹饰_A+(-3.05)*纹饰_B+2.798*纹饰_C+(-1.917)*类型_铅钡+2.824*类型_高钾+(-0.209)*颜色_浅绿+0.749*颜色_浅蓝+(-1.147)*颜色_深绿+1.024*颜色_深蓝+(-0.476)*颜色_紫+(-0.814)*颜色_绿+(-0.561)*颜色_蓝绿+2.342*颜色_黑+0.156*表面风化_无风化+0.751*表面风化_风化\n",
      "\n",
      "氧化镁(MgO)\n",
      "0.358\n",
      "从F检验的结果分析可以得到，显著性P值为0.006***，水平上呈现显著性, 拒绝回归系数为0的原假设， 因此模型基本满足要求\n",
      "对于变量共线性表现，变量 纹饰_A、纹饰_B、纹饰_C、类型_铅钡、类型_高钾、颜色_浅绿、颜色_浅蓝、颜色_深绿、颜色_深蓝、颜色_紫、颜色_绿、颜色_蓝绿、颜色_黑、表面风化_无风化、表面风化_风化 VIF值大于10， 存在共线关系，简易移除共线性的自变量或者进行岭回归或逐步回归。\n",
      "模型的公式如下:y=0.217+0.654*纹饰_A+(-0.63)*纹饰_B+0.193*纹饰_C+(-0.179)*类型_铅钡+0.396*类型_高钾+0.617*颜色_浅绿+0.143*颜色_浅蓝+(-0.204)*颜色_深绿+0.154*颜色_深蓝+(-0.238)*颜色_紫+(-0.2)*颜色_绿+(-0.034)*颜色_蓝绿+(-0.02)*颜色_黑+(-0.031)*表面风化_无风化+0.248*表面风化_风化\n",
      "\n",
      "氧化铝(Al2O3)\n",
      "0.502\n",
      "从F检验的结果分析可以得到，显著性P值为0.000***，水平上呈现显著性, 拒绝回归系数为0的原假设， 因此模型基本满足要求\n",
      "对于变量共线性表现，变量 纹饰_A、纹饰_B、纹饰_C、类型_铅钡、类型_高钾、颜色_浅绿、颜色_浅蓝、颜色_深绿、颜色_深蓝、颜色_紫、颜色_绿、颜色_蓝绿、颜色_黑、表面风化_无风化、表面风化_风化 VIF值大于10， 存在共线关系，简易移除共线性的自变量或者进行岭回归或逐步回归。\n",
      "模型的公式如下:y=1.48+3.713*纹饰_A+(-2.304)*纹饰_B+0.07*纹饰_C+(-1.134)*类型_铅钡+2.613*类型_高钾+1.324*颜色_浅绿+1.625*颜色_浅蓝+1.206*颜色_深绿+(-1.984)*颜色_深蓝+0.245*颜色_紫+0.605*颜色_绿+(-0.91)*颜色_蓝绿+(-0.632)*颜色_黑+0.429*表面风化_无风化+1.051*表面风化_风化\n",
      "\n",
      "氧化铁(Fe2O3)\n",
      "0.28\n",
      "从F检验的结果分析可以得到，显著性P值为0.052*，水平上不呈现显著性, 不能拒绝回归系数为0的原假设, 模型无效。\n",
      "对于变量共线性表现，变量 纹饰_A、纹饰_B、纹饰_C、类型_铅钡、类型_高钾、颜色_浅绿、颜色_浅蓝、颜色_深绿、颜色_深蓝、颜色_紫、颜色_绿、颜色_蓝绿、颜色_黑、表面风化_无风化、表面风化_风化 VIF值大于10， 存在共线关系，简易移除共线性的自变量或者进行岭回归或逐步回归。\n",
      "模型的公式如下:y=0.277+0.612*纹饰_A+(-0.792)*纹饰_B+0.457*纹饰_C+(-0.215)*类型_铅钡+0.492*类型_高钾+0.253*颜色_浅绿+0.009*颜色_浅蓝+(-0.501)*颜色_深绿+0.346*颜色_深蓝+0.182*颜色_紫+(-0.884)*颜色_绿+0.375*颜色_蓝绿+0.497*颜色_黑+0.364*表面风化_无风化+(-0.087)*表面风化_风化\n",
      "\n",
      "氧化铜(CuO)\n",
      "0.444\n",
      "从F检验的结果分析可以得到，显著性P值为0.000***，水平上呈现显著性, 拒绝回归系数为0的原假设， 因此模型基本满足要求\n",
      "对于变量共线性表现，变量 纹饰_A、纹饰_B、纹饰_C、类型_铅钡、类型_高钾、颜色_浅绿、颜色_浅蓝、颜色_深绿、颜色_深蓝、颜色_紫、颜色_绿、颜色_蓝绿、颜色_黑、表面风化_无风化、表面风化_风化 VIF值大于10， 存在共线关系，简易移除共线性的自变量或者进行岭回归或逐步回归。\n",
      "模型的公式如下:y=0.6+0.506*纹饰_A+(-0.708)*纹饰_B+0.802*纹饰_C+(-0.138)*类型_铅钡+0.738*类型_高钾+(-1.397)*颜色_浅绿+0.215*颜色_浅蓝+(-0.588)*颜色_深绿+(-1.516)*颜色_深蓝+4.525*颜色_紫+(-0.661)*颜色_绿+0.588*颜色_蓝绿+(-0.565)*颜色_黑+0.257*表面风化_无风化+0.343*表面风化_风化\n",
      "\n",
      "氧化铅(PbO)\n",
      "0.771\n",
      "从F检验的结果分析可以得到，显著性P值为0.000***，水平上呈现显著性, 拒绝回归系数为0的原假设， 因此模型基本满足要求\n",
      "对于变量共线性表现，变量 纹饰_A、纹饰_B、纹饰_C、类型_铅钡、类型_高钾、颜色_浅绿、颜色_浅蓝、颜色_深绿、颜色_深蓝、颜色_紫、颜色_绿、颜色_蓝绿、颜色_黑、表面风化_无风化、表面风化_风化 VIF值大于10， 存在共线关系，简易移除共线性的自变量或者进行岭回归或逐步回归。\n",
      "模型的公式如下:y=5.296+(-1.414)*纹饰_A+(-8.857)*纹饰_B+15.568*纹饰_C+14.958*类型_铅钡+(-9.661)*类型_高钾+(-7.741)*颜色_浅绿+(-0.49)*颜色_浅蓝+(-2.487)*颜色_深绿+18.63*颜色_深蓝+(-12.845)*颜色_紫+0.708*颜色_绿+4.315*颜色_蓝绿+5.206*颜色_黑+(-3.61)*表面风化_无风化+8.907*表面风化_风化\n",
      "\n",
      "氧化钡(BaO)\n",
      "0.69\n",
      "从F检验的结果分析可以得到，显著性P值为0.000***，水平上呈现显著性, 拒绝回归系数为0的原假设， 因此模型基本满足要求\n",
      "对于变量共线性表现，变量 纹饰_A、纹饰_B、纹饰_C、类型_铅钡、类型_高钾、颜色_浅绿、颜色_浅蓝、颜色_深绿、颜色_深蓝、颜色_紫、颜色_绿、颜色_蓝绿、颜色_黑、表面风化_无风化、表面风化_风化 VIF值大于10， 存在共线关系，简易移除共线性的自变量或者进行岭回归或逐步回归。\n",
      "模型的公式如下:y=2.129+1.898*纹饰_A+(-1.167)*纹饰_B+1.398*纹饰_C+5.89*类型_铅钡+(-3.76)*类型_高钾+(-3.513)*颜色_浅绿+(-3.426)*颜色_浅蓝+(-1.797)*颜色_深绿+(-0.299)*颜色_深蓝+15.856*颜色_紫+(-1.946)*颜色_绿+1.147*颜色_蓝绿+(-3.891)*颜色_黑+0.479*表面风化_无风化+1.651*表面风化_风化\n",
      "\n",
      "五氧化二磷(P2O5)\n",
      "0.381\n",
      "从F检验的结果分析可以得到，显著性P值为0.003***，水平上呈现显著性, 拒绝回归系数为0的原假设， 因此模型基本满足要求\n",
      "对于变量共线性表现，变量 纹饰_A、纹饰_B、纹饰_C、类型_铅钡、类型_高钾、颜色_浅绿、颜色_浅蓝、颜色_深绿、颜色_深蓝、颜色_紫、颜色_绿、颜色_蓝绿、颜色_黑、表面风化_无风化、表面风化_风化 VIF值大于10， 存在共线关系，简易移除共线性的自变量或者进行岭回归或逐步回归。\n",
      "模型的公式如下:y=0.626+0.129*纹饰_A+(-2.165)*纹饰_B+2.662*纹饰_C+(-0.156)*类型_铅钡+0.783*类型_高钾+(-0.418)*颜色_浅绿+0.902*颜色_浅蓝+(-3.185)*颜色_深绿+0.73*颜色_深蓝+(-0.11)*颜色_紫+(-2.063)*颜色_绿+(-0.31)*颜色_蓝绿+5.08*颜色_黑+(-0.72)*表面风化_无风化+1.346*表面风化_风化\n",
      "\n",
      "氧化锶(SrO)\n",
      "0.421\n",
      "从F检验的结果分析可以得到，显著性P值为0.001***，水平上呈现显著性, 拒绝回归系数为0的原假设， 因此模型基本满足要求\n",
      "对于变量共线性表现，变量 纹饰_A、纹饰_B、纹饰_C、类型_铅钡、类型_高钾、颜色_浅绿、颜色_浅蓝、颜色_深绿、颜色_深蓝、颜色_紫、颜色_绿、颜色_蓝绿、颜色_黑、表面风化_无风化、表面风化_风化 VIF值大于10， 存在共线关系，简易移除共线性的自变量或者进行岭回归或逐步回归。\n",
      "模型的公式如下:y=0.067+(-0.011)*纹饰_A+(-0.002)*纹饰_B+0.079*纹饰_C+0.141*类型_铅钡+(-0.074)*类型_高钾+(-0.161)*颜色_浅绿+0.079*颜色_浅蓝+(-0.037)*颜色_深绿+0.147*颜色_深蓝+0.208*颜色_紫+(-0.314)*颜色_绿+(-0.031)*颜色_蓝绿+0.176*颜色_黑+0.028*表面风化_无风化+0.039*表面风化_风化\n",
      "\n",
      "氧化锡(SnO2)\n",
      "0.499\n",
      "从F检验的结果分析可以得到，显著性P值为0.000***，水平上呈现显著性, 拒绝回归系数为0的原假设， 因此模型基本满足要求\n",
      "对于变量共线性表现，变量 纹饰_A、纹饰_B、纹饰_C、类型_铅钡、类型_高钾、颜色_浅绿、颜色_浅蓝、颜色_深绿、颜色_深蓝、颜色_紫、颜色_绿、颜色_蓝绿、颜色_黑、表面风化_无风化、表面风化_风化 VIF值大于10， 存在共线关系，简易移除共线性的自变量或者进行岭回归或逐步回归。\n",
      "模型的公式如下:y=0.086+0.161*纹饰_A+(-0.128)*纹饰_B+0.053*纹饰_C+(-0.142)*类型_铅钡+0.228*类型_高钾+(-0.003)*颜色_浅绿+(-0.104)*颜色_浅蓝+(-0.108)*颜色_深绿+0.904*颜色_深蓝+(-0.076)*颜色_紫+0.069*颜色_绿+(-0.338)*颜色_蓝绿+(-0.257)*颜色_黑+(-0.066)*表面风化_无风化+0.152*表面风化_风化\n",
      "\n",
      "二氧化硫(SO2)\n",
      "0.418\n",
      "从F检验的结果分析可以得到，显著性P值为0.001***，水平上呈现显著性, 拒绝回归系数为0的原假设， 因此模型基本满足要求\n",
      "对于变量共线性表现，变量 纹饰_A、纹饰_B、纹饰_C、类型_铅钡、类型_高钾、颜色_浅绿、颜色_浅蓝、颜色_深绿、颜色_深蓝、颜色_紫、颜色_绿、颜色_蓝绿、颜色_黑、表面风化_无风化、表面风化_风化 VIF值大于10， 存在共线关系，简易移除共线性的自变量或者进行岭回归或逐步回归。\n",
      "模型的公式如下:y=0.335+0.711*纹饰_A+(-0.768)*纹饰_B+0.392*纹饰_C+(-0.343)*类型_铅钡+0.678*类型_高钾+(-0.322)*颜色_浅绿+(-1.161)*颜色_浅蓝+(-0.274)*颜色_深绿+(-0.522)*颜色_深蓝+5.138*颜色_紫+0.137*颜色_绿+(-1.102)*颜色_蓝绿+(-1.56)*颜色_黑+(-0.522)*表面风化_无风化+0.857*表面风化_风化\n"
     ]
    }
   ],
   "source": [
    "# 统计规律 -- 线性回归\n",
    "from sklearn.linear_model import LinearRegression\n",
    "from sklearn.metrics import r2_score\n",
    "from sklearn.ensemble import RandomForestRegressor\n",
    "from spsspro.algorithm import statistical_model_analysis\n",
    "\n",
    "X = pd.get_dummies(data_merge[['纹饰', '类型', '颜色', '表面风化']])  # 定类变量进行\n",
    "for i in ['二氧化硅(SiO2)', '氧化钠(Na2O)',\n",
    "       '氧化钾(K2O)', '氧化钙(CaO)', '氧化镁(MgO)', '氧化铝(Al2O3)', '氧化铁(Fe2O3)',\n",
    "       '氧化铜(CuO)', '氧化铅(PbO)', '氧化钡(BaO)', '五氧化二磷(P2O5)', '氧化锶(SrO)',\n",
    "       '氧化锡(SnO2)', '二氧化硫(SO2)']:\n",
    "    y = data_merge[i]  # 线性回归\n",
    "    result = statistical_model_analysis.linear_regression(data_y=y, data_x1=X)\n",
    "    print()\n",
    "    print(i)\n",
    "    print(result['linear_regression_form']['r2'])\n",
    "    print(result['linear_regression_analysis_description'])\n",
    "    # 得到公式进行预测\n",
    "    # 有效直接用公式 无效抽出来另外做处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 144,
   "id": "e641cf28-e95e-48cd-92cd-9a58b3cc542d",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 存在氧化钠(Na2O)和 氧化铁(Fe2O3)的模型无效 导出csv使用岭回归算法\n",
    "temp1 = X\n",
    "temp1['氧化钠(Na2O)'] = data_merge['氧化钠(Na2O)']\n",
    "temp1.to_csv('1.2-岭回归1.csv', index=None)\n",
    "\n",
    "temp2 = X\n",
    "temp2['氧化铁(Fe2O3)'] = data_merge['氧化铁(Fe2O3)']\n",
    "temp2.to_csv('1.2-岭回归2.csv', index=None)"
   ]
  },
  {
   "cell_type": "raw",
   "id": "9e07f3dd-6766-4bb4-a55c-e4230621a72c",
   "metadata": {},
   "source": [
    "单独的预测分析--岭回归\n",
    "算法：\n",
    "岭回归\n",
    "\n",
    "变量：\n",
    "变量X:{纹饰_A，纹饰_B，纹饰_C，类型_铅钡，类型_高钾，颜色_浅绿，颜色_浅蓝，颜色_深绿，颜色_深蓝，颜色_紫，颜色_绿，颜色_蓝绿，颜色_黑，表面风化_无风化，表面风化_风化}；因变量Y:{氧化钠(Na2O)}收起 \n",
    "\n",
    "参数：\n",
    "k值:{自动}\n",
    "模型的公式：氧化钠(Na2O)=0.69＋0.649 × 纹饰_A-0.49 × 纹饰_B-0.471 × 纹饰_C＋0.043 × 类型_铅钡-0.043 × 类型_高钾-0.192 × 颜色_浅绿＋0.427 × 颜色_浅蓝＋0.652 × 颜色_深绿-1.083 × 颜色_深蓝-0.272 × 颜色_紫＋2.283 × 颜色_绿-0.231 × 颜色_蓝绿-1.346 × 颜色_黑-0.133 × 表面风化_无风化＋0.133 × 表面风化_风化\n",
    "\n",
    "模型的公式：氧化铁(Fe2O3)=1.001＋0.245 × 纹饰_A-0.901 × 纹饰_B＋0.055 × 纹饰_C-0.294 × 类型_铅钡＋0.294 × 类型_高钾＋0.127 × 颜色_浅绿-0.085 × 颜色_浅蓝-0.522 × 颜色_深绿＋0.199 × 颜色_深蓝＋0.076 × 颜色_紫-0.892 × 颜色_绿＋0.227 × 颜色_蓝绿＋0.338 × 颜色_黑＋0.247 × 表面风化_无风化-0.247 × 表面风化_风化\n",
    "https://www.spsspro.com/s/27ebe24872a84fe0a09d9105233b9e3b\n",
    "https://www.spsspro.com/s/bc46fd747b5543cc8c19e6f25f27b805"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 145,
   "id": "c88c4eb0-70e7-49a0-b3e1-cdf3c010c13d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>文物编号</th>\n",
       "      <th>纹饰</th>\n",
       "      <th>类型</th>\n",
       "      <th>颜色</th>\n",
       "      <th>表面风化</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>7</td>\n",
       "      <td>B</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>8</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>紫</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>8</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>紫</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>9</td>\n",
       "      <td>B</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>10</td>\n",
       "      <td>B</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>11</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>12</td>\n",
       "      <td>B</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>19</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>22</td>\n",
       "      <td>B</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>23</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>25</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>26</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>紫</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>26</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>紫</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>27</td>\n",
       "      <td>B</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>28</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>29</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>34</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>深绿</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>36</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>深绿</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>38</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>深绿</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>39</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>深绿</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>40</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>41</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅绿</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>42</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>42</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>43</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>43</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>44</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>48</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>49</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>黑</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>49</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>黑</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>50</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>黑</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>50</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>黑</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>51</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>51</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>52</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>53</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>54</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>54</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>56</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>57</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>58</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    文物编号 纹饰  类型  颜色 表面风化\n",
       "0      2  A  铅钡  浅蓝   风化\n",
       "1      7  B  高钾  蓝绿   风化\n",
       "2      8  C  铅钡   紫   风化\n",
       "3      8  C  铅钡   紫   风化\n",
       "4      9  B  高钾  蓝绿   风化\n",
       "5     10  B  高钾  蓝绿   风化\n",
       "6     11  C  铅钡  浅蓝   风化\n",
       "7     12  B  高钾  蓝绿   风化\n",
       "8     19  A  铅钡  浅蓝   风化\n",
       "9     22  B  高钾  蓝绿   风化\n",
       "10    23  A  铅钡  蓝绿   风化\n",
       "11    25  C  铅钡  浅蓝   风化\n",
       "12    26  C  铅钡   紫   风化\n",
       "13    26  C  铅钡   紫   风化\n",
       "14    27  B  高钾  蓝绿   风化\n",
       "15    28  A  铅钡  浅蓝   风化\n",
       "16    29  A  铅钡  浅蓝   风化\n",
       "17    34  C  铅钡  深绿   风化\n",
       "18    36  C  铅钡  深绿   风化\n",
       "19    38  C  铅钡  深绿   风化\n",
       "20    39  C  铅钡  深绿   风化\n",
       "21    40  C  铅钡  浅蓝   风化\n",
       "22    41  C  铅钡  浅绿   风化\n",
       "23    42  A  铅钡  浅蓝   风化\n",
       "24    42  A  铅钡  浅蓝   风化\n",
       "25    43  C  铅钡  浅蓝   风化\n",
       "26    43  C  铅钡  浅蓝   风化\n",
       "27    44  A  铅钡  浅蓝   风化\n",
       "28    48  A  铅钡  浅蓝   风化\n",
       "29    49  A  铅钡   黑   风化\n",
       "30    49  A  铅钡   黑   风化\n",
       "31    50  A  铅钡   黑   风化\n",
       "32    50  A  铅钡   黑   风化\n",
       "33    51  C  铅钡  浅蓝   风化\n",
       "34    51  C  铅钡  浅蓝   风化\n",
       "35    52  C  铅钡  浅蓝   风化\n",
       "36    53  A  铅钡  浅蓝   风化\n",
       "37    54  C  铅钡  浅蓝   风化\n",
       "38    54  C  铅钡  浅蓝   风化\n",
       "39    56  C  铅钡  蓝绿   风化\n",
       "40    57  C  铅钡  蓝绿   风化\n",
       "41    58  C  铅钡  浅蓝   风化"
      ]
     },
     "execution_count": 145,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 预测开始 无风化前的一个效果\n",
    "X1 = data_merge[data_merge['表面风化'] == '风化'][['文物编号', '纹饰', '类型', '颜色', '表面风化']]  # 无风化 -> 风化\n",
    "X1.reset_index(inplace=True, drop=True)\n",
    "X1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 146,
   "id": "8a2ba365-066c-4438-9916-d6190c63eb1e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>纹饰_A</th>\n",
       "      <th>纹饰_B</th>\n",
       "      <th>纹饰_C</th>\n",
       "      <th>类型_铅钡</th>\n",
       "      <th>类型_高钾</th>\n",
       "      <th>颜色_浅绿</th>\n",
       "      <th>颜色_浅蓝</th>\n",
       "      <th>颜色_深绿</th>\n",
       "      <th>颜色_深蓝</th>\n",
       "      <th>颜色_紫</th>\n",
       "      <th>颜色_绿</th>\n",
       "      <th>颜色_蓝绿</th>\n",
       "      <th>颜色_黑</th>\n",
       "      <th>表面风化_无风化</th>\n",
       "      <th>表面风化_风化</th>\n",
       "      <th>氧化钠(Na2O)</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>7.92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>2.31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.92</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>2.22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>5.74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>5.68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>52</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>54</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>55</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>58</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>59</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>60</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3.04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>61</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>62</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>64</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>66</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    纹饰_A  纹饰_B  纹饰_C  类型_铅钡  类型_高钾  颜色_浅绿  颜色_浅蓝  颜色_深绿  颜色_深蓝  颜色_紫  颜色_绿  \\\n",
       "1      1     0     0      1      0      0      1      0      0     0     0   \n",
       "8      0     1     0      0      1      0      0      0      0     0     0   \n",
       "9      0     0     1      1      0      0      0      0      0     1     0   \n",
       "10     0     0     1      1      0      0      0      0      0     1     0   \n",
       "11     0     1     0      0      1      0      0      0      0     0     0   \n",
       "12     0     1     0      0      1      0      0      0      0     0     0   \n",
       "13     0     0     1      1      0      0      1      0      0     0     0   \n",
       "14     0     1     0      0      1      0      0      0      0     0     0   \n",
       "19     1     0     0      1      0      0      1      0      0     0     0   \n",
       "22     0     1     0      0      1      0      0      0      0     0     0   \n",
       "23     1     0     0      1      0      0      0      0      0     0     0   \n",
       "25     0     0     1      1      0      0      1      0      0     0     0   \n",
       "26     0     0     1      1      0      0      0      0      0     1     0   \n",
       "27     0     0     1      1      0      0      0      0      0     1     0   \n",
       "28     0     1     0      0      1      0      0      0      0     0     0   \n",
       "29     1     0     0      1      0      0      1      0      0     0     0   \n",
       "30     1     0     0      1      0      0      1      0      0     0     0   \n",
       "36     0     0     1      1      0      0      0      1      0     0     0   \n",
       "38     0     0     1      1      0      0      0      1      0     0     0   \n",
       "40     0     0     1      1      0      0      0      1      0     0     0   \n",
       "41     0     0     1      1      0      0      0      1      0     0     0   \n",
       "42     0     0     1      1      0      0      1      0      0     0     0   \n",
       "43     0     0     1      1      0      1      0      0      0     0     0   \n",
       "44     1     0     0      1      0      0      1      0      0     0     0   \n",
       "45     1     0     0      1      0      0      1      0      0     0     0   \n",
       "46     0     0     1      1      0      0      1      0      0     0     0   \n",
       "47     0     0     1      1      0      0      1      0      0     0     0   \n",
       "48     1     0     0      1      0      0      1      0      0     0     0   \n",
       "52     1     0     0      1      0      0      1      0      0     0     0   \n",
       "53     1     0     0      1      0      0      0      0      0     0     0   \n",
       "54     1     0     0      1      0      0      0      0      0     0     0   \n",
       "55     1     0     0      1      0      0      0      0      0     0     0   \n",
       "56     1     0     0      1      0      0      0      0      0     0     0   \n",
       "57     0     0     1      1      0      0      1      0      0     0     0   \n",
       "58     0     0     1      1      0      0      1      0      0     0     0   \n",
       "59     0     0     1      1      0      0      1      0      0     0     0   \n",
       "60     1     0     0      1      0      0      1      0      0     0     0   \n",
       "61     0     0     1      1      0      0      1      0      0     0     0   \n",
       "62     0     0     1      1      0      0      1      0      0     0     0   \n",
       "64     0     0     1      1      0      0      0      0      0     0     0   \n",
       "65     0     0     1      1      0      0      0      0      0     0     0   \n",
       "66     0     0     1      1      0      0      1      0      0     0     0   \n",
       "\n",
       "    颜色_蓝绿  颜色_黑  表面风化_无风化  表面风化_风化  氧化钠(Na2O)  \n",
       "1       0     0         0        1       0.00  \n",
       "8       1     0         0        1       0.00  \n",
       "9       0     0         0        1       0.00  \n",
       "10      0     0         0        1       0.00  \n",
       "11      1     0         0        1       0.00  \n",
       "12      1     0         0        1       0.00  \n",
       "13      0     0         0        1       0.00  \n",
       "14      1     0         0        1       0.00  \n",
       "19      0     0         0        1       0.00  \n",
       "22      1     0         0        1       0.00  \n",
       "23      1     0         0        1       7.92  \n",
       "25      0     0         0        1       2.31  \n",
       "26      0     0         0        1       0.00  \n",
       "27      0     0         0        1       0.00  \n",
       "28      1     0         0        1       0.00  \n",
       "29      0     0         0        1       0.00  \n",
       "30      0     0         0        1       0.92  \n",
       "36      0     0         0        1       0.00  \n",
       "38      0     0         0        1       2.22  \n",
       "40      0     0         0        1       1.38  \n",
       "41      0     0         0        1       0.00  \n",
       "42      0     0         0        1       0.00  \n",
       "43      0     0         0        1       0.00  \n",
       "44      0     0         0        1       5.74  \n",
       "45      0     0         0        1       5.68  \n",
       "46      0     0         0        1       0.00  \n",
       "47      0     0         0        1       0.00  \n",
       "48      0     0         0        1       3.06  \n",
       "52      0     0         0        1       0.80  \n",
       "53      0     1         0        1       0.00  \n",
       "54      0     1         0        1       0.00  \n",
       "55      0     1         0        1       0.00  \n",
       "56      0     1         0        1       0.00  \n",
       "57      0     0         0        1       0.00  \n",
       "58      0     0         0        1       0.00  \n",
       "59      0     0         0        1       1.22  \n",
       "60      0     0         0        1       3.04  \n",
       "61      0     0         0        1       0.00  \n",
       "62      0     0         0        1       0.00  \n",
       "64      1     0         0        1       0.00  \n",
       "65      1     0         0        1       0.00  \n",
       "66      0     0         0        1       0.00  "
      ]
     },
     "execution_count": 146,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X2 = X.loc[data_merge[data_merge['表面风化']=='风化'].index][X.columns[:-1]]\n",
    "X2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 152,
   "id": "dadbfdb7-c225-4867-baad-6dc40daacf51",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 模型公式运用\n",
    "y=27.013+1.974*X2['纹饰_A']+40.86*X2['纹饰_B']+(-15.821)*X2['纹饰_C']+6.788*X2['类型_铅钡']+20.225*X2['类型_高钾']+16.834*X2['颜色_浅绿']+5.173*X2['颜色_浅蓝']+15.416*X2['颜色_深绿']+(-12.636)*X2['颜色_深蓝']+(-4.095)*X2['颜色_紫']+8.405*X2['颜色_绿']+1.477*X2['颜色_蓝绿']+(-3.563)*X2['颜色_黑']\n",
    "X1['二氧化硅(SiO2)'] = y.to_list()\n",
    "y=0.69+0.649 * X2['纹饰_A']-0.49*X2['纹饰_B']-0.471*X2['纹饰_C']+0.043*X2['类型_铅钡']-0.043*X2['类型_高钾']-0.192*X2['颜色_浅绿']+0.427*X2['颜色_浅蓝']+0.652*X2['颜色_深绿']-1.083*X2['颜色_深蓝']-0.272*X2['颜色_紫']+2.283*X2['颜色_绿']-0.231*X2['颜色_蓝绿']-1.346*X2['颜色_黑']\n",
    "X1['氧化钠(Na2O)'] = y.to_list()\n",
    "y=0.951+2.583*X2['纹饰_A']+(-5.029)*X2['纹饰_B']+3.397*X2['纹饰_C']+(-4.672)*X2['类型_铅钡']+5.623*X2['类型_高钾']+0.025*X2['颜色_浅绿']+0.761*X2['颜色_浅蓝']+0.26*X2['颜色_深绿']+0.719*X2['颜色_深蓝']+(-0.044)*X2['颜色_紫']+(-0.273)*X2['颜色_绿']+(-1.355)*X2['颜色_蓝绿']+0.859*X2['颜色_黑']\n",
    "X1['氧化钾(K2O)'] = y.to_list()\n",
    "y=0.907+1.159*X2['纹饰_A']+(-3.05)*X2['纹饰_B']+2.798*X2['纹饰_C']+(-1.917)*X2['类型_铅钡']+2.824*X2['类型_高钾']+(-0.209)*X2['颜色_浅绿']+0.749*X2['颜色_浅蓝']+(-1.147)*X2['颜色_深绿']+1.024*X2['颜色_深蓝']+(-0.476)*X2['颜色_紫']+(-0.814)*X2['颜色_绿']+(-0.561)*X2['颜色_蓝绿']+2.342*X2['颜色_黑']\n",
    "X1['氧化钙(CaO)'] = y.to_list()\n",
    "y=0.217+0.654*X2['纹饰_A']+(-0.63)*X2['纹饰_B']+0.193*X2['纹饰_C']+(-0.179)*X2['类型_铅钡']+0.396*X2['类型_高钾']+0.617*X2['颜色_浅绿']+0.143*X2['颜色_浅蓝']+(-0.204)*X2['颜色_深绿']+0.154*X2['颜色_深蓝']+(-0.238)*X2['颜色_紫']+(-0.2)*X2['颜色_绿']+(-0.034)*X2['颜色_蓝绿']+(-0.02)*X2['颜色_黑']\n",
    "X1['氧化镁(MgO)'] = y.to_list()\n",
    "y=1.48+3.713*X2['纹饰_A']+(-2.304)*X2['纹饰_B']+0.07*X2['纹饰_C']+(-1.134)*X2['类型_铅钡']+2.613*X2['类型_高钾']+1.324*X2['颜色_浅绿']+1.625*X2['颜色_浅蓝']+1.206*X2['颜色_深绿']+(-1.984)*X2['颜色_深蓝']+0.245*X2['颜色_紫']+0.605*X2['颜色_绿']+(-0.91)*X2['颜色_蓝绿']+(-0.632)*X2['颜色_黑']\n",
    "X1['氧化铝(Al2O3)'] = y.to_list()\n",
    "y=1.001+0.245*X2['纹饰_A']-0.901*X2['纹饰_B']+0.055 * X2['纹饰_C']-0.294 * X2['类型_铅钡']+0.294 * X2['类型_高钾']+0.127 * X2['颜色_浅绿']-0.085 * X2['颜色_浅蓝']-0.522 *X2['颜色_深绿']+0.199 * X2['颜色_深蓝']+0.076 * X2['颜色_紫']-0.892 * X2['颜色_绿']+0.227 * X2['颜色_蓝绿']+0.338 *X2['颜色_黑']\n",
    "X1['氧化铁(Fe2O3)'] = y.to_list()\n",
    "y=0.6+0.506*X2['纹饰_A']+(-0.708)*X2['纹饰_B']+0.802*X2['纹饰_C']+(-0.138)*X2['类型_铅钡']+0.738*X2['类型_高钾']+(-1.397)*X2['颜色_浅绿']+0.215*X2['颜色_浅蓝']+(-0.588)*X2['颜色_深绿']+(-1.516)*X2['颜色_深蓝']+4.525*X2['颜色_紫']+(-0.661)*X2['颜色_绿']+0.588*X2['颜色_蓝绿']+(-0.565)*X2['颜色_黑']\n",
    "X1['氧化铜(CuO)'] = y.to_list()\n",
    "y=5.296+(-1.414)*X2['纹饰_A']+(-8.857)*X2['纹饰_B']+15.568*X2['纹饰_C']+14.958*X2['类型_铅钡']+(-9.661)*X2['类型_高钾']+(-7.741)*X2['颜色_浅绿']+(-0.49)*X2['颜色_浅蓝']+(-2.487)*X2['颜色_深绿']+18.63*X2['颜色_深蓝']+(-12.845)*X2['颜色_紫']+0.708*X2['颜色_绿']+4.315*X2['颜色_蓝绿']+5.206*X2['颜色_黑']\n",
    "X1['氧化铅(PbO)'] = y.to_list()\n",
    "y=2.129+1.898*X2['纹饰_A']+(-1.167)*X2['纹饰_B']+1.398*X2['纹饰_C']+5.89*X2['类型_铅钡']+(-3.76)*X2['类型_高钾']+(-3.513)*X2['颜色_浅绿']+(-3.426)*X2['颜色_浅蓝']+(-1.797)*X2['颜色_深绿']+(-0.299)*X2['颜色_深蓝']+15.856*X2['颜色_紫']+(-1.946)*X2['颜色_绿']+1.147*X2['颜色_蓝绿']+(-3.891)*X2['颜色_黑']\n",
    "X1['氧化钡(BaO)'] = y.to_list()\n",
    "y=0.626+0.129*X2['纹饰_A']+(-2.165)*X2['纹饰_B']+2.662*X2['纹饰_C']+(-0.156)*X2['类型_铅钡']+0.783*X2['类型_高钾']+(-0.418)*X2['颜色_浅绿']+0.902*X2['颜色_浅蓝']+(-3.185)*X2['颜色_深绿']+0.73*X2['颜色_深蓝']+(-0.11)*X2['颜色_紫']+(-2.063)*X2['颜色_绿']+(-0.31)*X2['颜色_蓝绿']+5.08*X2['颜色_黑']\n",
    "X1['五氧化二磷(P2O5)'] = y.to_list()\n",
    "y=0.067+(-0.011)*X2['纹饰_A']+(-0.002)*X2['纹饰_B']+0.079*X2['纹饰_C']+0.141*X2['类型_铅钡']+(-0.074)*X2['类型_高钾']+(-0.161)*X2['颜色_浅绿']+0.079*X2['颜色_浅蓝']+(-0.037)*X2['颜色_深绿']+0.147*X2['颜色_深蓝']+0.208*X2['颜色_紫']+(-0.314)*X2['颜色_绿']+(-0.031)*X2['颜色_蓝绿']+0.176*X2['颜色_黑']\n",
    "X1['氧化锶(SrO)'] = y.to_list()\n",
    "y=0.335+0.711*X2['纹饰_A']+(-0.768)*X2['纹饰_B']+0.392*X2['纹饰_C']+(-0.343)*X2['类型_铅钡']+0.678*X2['类型_高钾']+(-0.322)*X2['颜色_浅绿']+(-1.161)*X2['颜色_浅蓝']+(-0.274)*X2['颜色_深绿']+(-0.522)*X2['颜色_深蓝']+5.138*X2['颜色_紫']+0.137*X2['颜色_绿']+(-1.102)*X2['颜色_蓝绿']+(-1.56)*X2['颜色_黑']\n",
    "X1['二氧化硫(SO2)'] = y.to_list()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 157,
   "id": "06d6ad3c-a165-472a-9a1f-c10004dd6963",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>文物编号</th>\n",
       "      <th>纹饰</th>\n",
       "      <th>类型</th>\n",
       "      <th>颜色</th>\n",
       "      <th>表面风化</th>\n",
       "      <th>二氧化硅(SiO2)</th>\n",
       "      <th>氧化钠(Na2O)</th>\n",
       "      <th>氧化钾(K2O)</th>\n",
       "      <th>氧化钙(CaO)</th>\n",
       "      <th>氧化镁(MgO)</th>\n",
       "      <th>氧化铝(Al2O3)</th>\n",
       "      <th>氧化铁(Fe2O3)</th>\n",
       "      <th>氧化铜(CuO)</th>\n",
       "      <th>氧化铅(PbO)</th>\n",
       "      <th>氧化钡(BaO)</th>\n",
       "      <th>五氧化二磷(P2O5)</th>\n",
       "      <th>氧化锶(SrO)</th>\n",
       "      <th>二氧化硫(SO2)</th>\n",
       "      <th>sum</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>40.948</td>\n",
       "      <td>1.809</td>\n",
       "      <td>-0.377</td>\n",
       "      <td>0.898</td>\n",
       "      <td>0.835</td>\n",
       "      <td>5.684</td>\n",
       "      <td>0.867</td>\n",
       "      <td>1.183</td>\n",
       "      <td>18.350</td>\n",
       "      <td>6.491</td>\n",
       "      <td>1.501</td>\n",
       "      <td>0.276</td>\n",
       "      <td>-0.458</td>\n",
       "      <td>78.465</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>7</td>\n",
       "      <td>B</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>89.575</td>\n",
       "      <td>-0.074</td>\n",
       "      <td>0.190</td>\n",
       "      <td>0.120</td>\n",
       "      <td>-0.051</td>\n",
       "      <td>0.879</td>\n",
       "      <td>0.621</td>\n",
       "      <td>1.218</td>\n",
       "      <td>-8.907</td>\n",
       "      <td>-1.651</td>\n",
       "      <td>-1.066</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>-0.857</td>\n",
       "      <td>80.814</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>8</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>紫</td>\n",
       "      <td>风化</td>\n",
       "      <td>13.885</td>\n",
       "      <td>-0.010</td>\n",
       "      <td>-0.368</td>\n",
       "      <td>1.312</td>\n",
       "      <td>-0.007</td>\n",
       "      <td>0.661</td>\n",
       "      <td>0.838</td>\n",
       "      <td>5.789</td>\n",
       "      <td>22.977</td>\n",
       "      <td>25.273</td>\n",
       "      <td>3.022</td>\n",
       "      <td>0.495</td>\n",
       "      <td>5.522</td>\n",
       "      <td>73.867</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>8</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>紫</td>\n",
       "      <td>风化</td>\n",
       "      <td>13.885</td>\n",
       "      <td>-0.010</td>\n",
       "      <td>-0.368</td>\n",
       "      <td>1.312</td>\n",
       "      <td>-0.007</td>\n",
       "      <td>0.661</td>\n",
       "      <td>0.838</td>\n",
       "      <td>5.789</td>\n",
       "      <td>22.977</td>\n",
       "      <td>25.273</td>\n",
       "      <td>3.022</td>\n",
       "      <td>0.495</td>\n",
       "      <td>5.522</td>\n",
       "      <td>73.867</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>9</td>\n",
       "      <td>B</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>89.575</td>\n",
       "      <td>-0.074</td>\n",
       "      <td>0.190</td>\n",
       "      <td>0.120</td>\n",
       "      <td>-0.051</td>\n",
       "      <td>0.879</td>\n",
       "      <td>0.621</td>\n",
       "      <td>1.218</td>\n",
       "      <td>-8.907</td>\n",
       "      <td>-1.651</td>\n",
       "      <td>-1.066</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>-0.857</td>\n",
       "      <td>80.814</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>10</td>\n",
       "      <td>B</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>89.575</td>\n",
       "      <td>-0.074</td>\n",
       "      <td>0.190</td>\n",
       "      <td>0.120</td>\n",
       "      <td>-0.051</td>\n",
       "      <td>0.879</td>\n",
       "      <td>0.621</td>\n",
       "      <td>1.218</td>\n",
       "      <td>-8.907</td>\n",
       "      <td>-1.651</td>\n",
       "      <td>-1.066</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>-0.857</td>\n",
       "      <td>80.814</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>11</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>23.153</td>\n",
       "      <td>0.689</td>\n",
       "      <td>0.437</td>\n",
       "      <td>2.537</td>\n",
       "      <td>0.374</td>\n",
       "      <td>2.041</td>\n",
       "      <td>0.677</td>\n",
       "      <td>1.479</td>\n",
       "      <td>35.332</td>\n",
       "      <td>5.991</td>\n",
       "      <td>4.034</td>\n",
       "      <td>0.366</td>\n",
       "      <td>-0.777</td>\n",
       "      <td>77.110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>12</td>\n",
       "      <td>B</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>89.575</td>\n",
       "      <td>-0.074</td>\n",
       "      <td>0.190</td>\n",
       "      <td>0.120</td>\n",
       "      <td>-0.051</td>\n",
       "      <td>0.879</td>\n",
       "      <td>0.621</td>\n",
       "      <td>1.218</td>\n",
       "      <td>-8.907</td>\n",
       "      <td>-1.651</td>\n",
       "      <td>-1.066</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>-0.857</td>\n",
       "      <td>80.814</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>19</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>40.948</td>\n",
       "      <td>1.809</td>\n",
       "      <td>-0.377</td>\n",
       "      <td>0.898</td>\n",
       "      <td>0.835</td>\n",
       "      <td>5.684</td>\n",
       "      <td>0.867</td>\n",
       "      <td>1.183</td>\n",
       "      <td>18.350</td>\n",
       "      <td>6.491</td>\n",
       "      <td>1.501</td>\n",
       "      <td>0.276</td>\n",
       "      <td>-0.458</td>\n",
       "      <td>78.465</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>22</td>\n",
       "      <td>B</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>89.575</td>\n",
       "      <td>-0.074</td>\n",
       "      <td>0.190</td>\n",
       "      <td>0.120</td>\n",
       "      <td>-0.051</td>\n",
       "      <td>0.879</td>\n",
       "      <td>0.621</td>\n",
       "      <td>1.218</td>\n",
       "      <td>-8.907</td>\n",
       "      <td>-1.651</td>\n",
       "      <td>-1.066</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>-0.857</td>\n",
       "      <td>80.814</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>23</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>37.252</td>\n",
       "      <td>1.151</td>\n",
       "      <td>-2.493</td>\n",
       "      <td>-0.412</td>\n",
       "      <td>0.658</td>\n",
       "      <td>3.149</td>\n",
       "      <td>1.179</td>\n",
       "      <td>1.556</td>\n",
       "      <td>23.155</td>\n",
       "      <td>11.064</td>\n",
       "      <td>0.289</td>\n",
       "      <td>0.166</td>\n",
       "      <td>-0.399</td>\n",
       "      <td>76.714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>25</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>23.153</td>\n",
       "      <td>0.689</td>\n",
       "      <td>0.437</td>\n",
       "      <td>2.537</td>\n",
       "      <td>0.374</td>\n",
       "      <td>2.041</td>\n",
       "      <td>0.677</td>\n",
       "      <td>1.479</td>\n",
       "      <td>35.332</td>\n",
       "      <td>5.991</td>\n",
       "      <td>4.034</td>\n",
       "      <td>0.366</td>\n",
       "      <td>-0.777</td>\n",
       "      <td>77.110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>26</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>紫</td>\n",
       "      <td>风化</td>\n",
       "      <td>13.885</td>\n",
       "      <td>-0.010</td>\n",
       "      <td>-0.368</td>\n",
       "      <td>1.312</td>\n",
       "      <td>-0.007</td>\n",
       "      <td>0.661</td>\n",
       "      <td>0.838</td>\n",
       "      <td>5.789</td>\n",
       "      <td>22.977</td>\n",
       "      <td>25.273</td>\n",
       "      <td>3.022</td>\n",
       "      <td>0.495</td>\n",
       "      <td>5.522</td>\n",
       "      <td>73.867</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>26</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>紫</td>\n",
       "      <td>风化</td>\n",
       "      <td>13.885</td>\n",
       "      <td>-0.010</td>\n",
       "      <td>-0.368</td>\n",
       "      <td>1.312</td>\n",
       "      <td>-0.007</td>\n",
       "      <td>0.661</td>\n",
       "      <td>0.838</td>\n",
       "      <td>5.789</td>\n",
       "      <td>22.977</td>\n",
       "      <td>25.273</td>\n",
       "      <td>3.022</td>\n",
       "      <td>0.495</td>\n",
       "      <td>5.522</td>\n",
       "      <td>73.867</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>27</td>\n",
       "      <td>B</td>\n",
       "      <td>高钾</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>89.575</td>\n",
       "      <td>-0.074</td>\n",
       "      <td>0.190</td>\n",
       "      <td>0.120</td>\n",
       "      <td>-0.051</td>\n",
       "      <td>0.879</td>\n",
       "      <td>0.621</td>\n",
       "      <td>1.218</td>\n",
       "      <td>-8.907</td>\n",
       "      <td>-1.651</td>\n",
       "      <td>-1.066</td>\n",
       "      <td>-0.040</td>\n",
       "      <td>-0.857</td>\n",
       "      <td>80.814</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>28</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>40.948</td>\n",
       "      <td>1.809</td>\n",
       "      <td>-0.377</td>\n",
       "      <td>0.898</td>\n",
       "      <td>0.835</td>\n",
       "      <td>5.684</td>\n",
       "      <td>0.867</td>\n",
       "      <td>1.183</td>\n",
       "      <td>18.350</td>\n",
       "      <td>6.491</td>\n",
       "      <td>1.501</td>\n",
       "      <td>0.276</td>\n",
       "      <td>-0.458</td>\n",
       "      <td>78.465</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>29</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>40.948</td>\n",
       "      <td>1.809</td>\n",
       "      <td>-0.377</td>\n",
       "      <td>0.898</td>\n",
       "      <td>0.835</td>\n",
       "      <td>5.684</td>\n",
       "      <td>0.867</td>\n",
       "      <td>1.183</td>\n",
       "      <td>18.350</td>\n",
       "      <td>6.491</td>\n",
       "      <td>1.501</td>\n",
       "      <td>0.276</td>\n",
       "      <td>-0.458</td>\n",
       "      <td>78.465</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>34</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>深绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>33.396</td>\n",
       "      <td>0.914</td>\n",
       "      <td>-0.064</td>\n",
       "      <td>0.641</td>\n",
       "      <td>0.027</td>\n",
       "      <td>1.622</td>\n",
       "      <td>0.240</td>\n",
       "      <td>0.676</td>\n",
       "      <td>33.335</td>\n",
       "      <td>7.620</td>\n",
       "      <td>-0.053</td>\n",
       "      <td>0.250</td>\n",
       "      <td>0.110</td>\n",
       "      <td>78.604</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>36</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>深绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>33.396</td>\n",
       "      <td>0.914</td>\n",
       "      <td>-0.064</td>\n",
       "      <td>0.641</td>\n",
       "      <td>0.027</td>\n",
       "      <td>1.622</td>\n",
       "      <td>0.240</td>\n",
       "      <td>0.676</td>\n",
       "      <td>33.335</td>\n",
       "      <td>7.620</td>\n",
       "      <td>-0.053</td>\n",
       "      <td>0.250</td>\n",
       "      <td>0.110</td>\n",
       "      <td>78.604</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>38</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>深绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>33.396</td>\n",
       "      <td>0.914</td>\n",
       "      <td>-0.064</td>\n",
       "      <td>0.641</td>\n",
       "      <td>0.027</td>\n",
       "      <td>1.622</td>\n",
       "      <td>0.240</td>\n",
       "      <td>0.676</td>\n",
       "      <td>33.335</td>\n",
       "      <td>7.620</td>\n",
       "      <td>-0.053</td>\n",
       "      <td>0.250</td>\n",
       "      <td>0.110</td>\n",
       "      <td>78.604</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>39</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>深绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>33.396</td>\n",
       "      <td>0.914</td>\n",
       "      <td>-0.064</td>\n",
       "      <td>0.641</td>\n",
       "      <td>0.027</td>\n",
       "      <td>1.622</td>\n",
       "      <td>0.240</td>\n",
       "      <td>0.676</td>\n",
       "      <td>33.335</td>\n",
       "      <td>7.620</td>\n",
       "      <td>-0.053</td>\n",
       "      <td>0.250</td>\n",
       "      <td>0.110</td>\n",
       "      <td>78.604</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>40</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>23.153</td>\n",
       "      <td>0.689</td>\n",
       "      <td>0.437</td>\n",
       "      <td>2.537</td>\n",
       "      <td>0.374</td>\n",
       "      <td>2.041</td>\n",
       "      <td>0.677</td>\n",
       "      <td>1.479</td>\n",
       "      <td>35.332</td>\n",
       "      <td>5.991</td>\n",
       "      <td>4.034</td>\n",
       "      <td>0.366</td>\n",
       "      <td>-0.777</td>\n",
       "      <td>77.110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>41</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>34.814</td>\n",
       "      <td>0.070</td>\n",
       "      <td>-0.299</td>\n",
       "      <td>1.579</td>\n",
       "      <td>0.848</td>\n",
       "      <td>1.740</td>\n",
       "      <td>0.889</td>\n",
       "      <td>-0.133</td>\n",
       "      <td>28.081</td>\n",
       "      <td>5.904</td>\n",
       "      <td>2.714</td>\n",
       "      <td>0.126</td>\n",
       "      <td>0.062</td>\n",
       "      <td>76.333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>42</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>40.948</td>\n",
       "      <td>1.809</td>\n",
       "      <td>-0.377</td>\n",
       "      <td>0.898</td>\n",
       "      <td>0.835</td>\n",
       "      <td>5.684</td>\n",
       "      <td>0.867</td>\n",
       "      <td>1.183</td>\n",
       "      <td>18.350</td>\n",
       "      <td>6.491</td>\n",
       "      <td>1.501</td>\n",
       "      <td>0.276</td>\n",
       "      <td>-0.458</td>\n",
       "      <td>78.465</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>42</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>40.948</td>\n",
       "      <td>1.809</td>\n",
       "      <td>-0.377</td>\n",
       "      <td>0.898</td>\n",
       "      <td>0.835</td>\n",
       "      <td>5.684</td>\n",
       "      <td>0.867</td>\n",
       "      <td>1.183</td>\n",
       "      <td>18.350</td>\n",
       "      <td>6.491</td>\n",
       "      <td>1.501</td>\n",
       "      <td>0.276</td>\n",
       "      <td>-0.458</td>\n",
       "      <td>78.465</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>43</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>23.153</td>\n",
       "      <td>0.689</td>\n",
       "      <td>0.437</td>\n",
       "      <td>2.537</td>\n",
       "      <td>0.374</td>\n",
       "      <td>2.041</td>\n",
       "      <td>0.677</td>\n",
       "      <td>1.479</td>\n",
       "      <td>35.332</td>\n",
       "      <td>5.991</td>\n",
       "      <td>4.034</td>\n",
       "      <td>0.366</td>\n",
       "      <td>-0.777</td>\n",
       "      <td>77.110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>43</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>23.153</td>\n",
       "      <td>0.689</td>\n",
       "      <td>0.437</td>\n",
       "      <td>2.537</td>\n",
       "      <td>0.374</td>\n",
       "      <td>2.041</td>\n",
       "      <td>0.677</td>\n",
       "      <td>1.479</td>\n",
       "      <td>35.332</td>\n",
       "      <td>5.991</td>\n",
       "      <td>4.034</td>\n",
       "      <td>0.366</td>\n",
       "      <td>-0.777</td>\n",
       "      <td>77.110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>44</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>40.948</td>\n",
       "      <td>1.809</td>\n",
       "      <td>-0.377</td>\n",
       "      <td>0.898</td>\n",
       "      <td>0.835</td>\n",
       "      <td>5.684</td>\n",
       "      <td>0.867</td>\n",
       "      <td>1.183</td>\n",
       "      <td>18.350</td>\n",
       "      <td>6.491</td>\n",
       "      <td>1.501</td>\n",
       "      <td>0.276</td>\n",
       "      <td>-0.458</td>\n",
       "      <td>78.465</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>48</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>40.948</td>\n",
       "      <td>1.809</td>\n",
       "      <td>-0.377</td>\n",
       "      <td>0.898</td>\n",
       "      <td>0.835</td>\n",
       "      <td>5.684</td>\n",
       "      <td>0.867</td>\n",
       "      <td>1.183</td>\n",
       "      <td>18.350</td>\n",
       "      <td>6.491</td>\n",
       "      <td>1.501</td>\n",
       "      <td>0.276</td>\n",
       "      <td>-0.458</td>\n",
       "      <td>78.465</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>49</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>黑</td>\n",
       "      <td>风化</td>\n",
       "      <td>32.212</td>\n",
       "      <td>0.036</td>\n",
       "      <td>-0.279</td>\n",
       "      <td>2.491</td>\n",
       "      <td>0.672</td>\n",
       "      <td>3.427</td>\n",
       "      <td>1.290</td>\n",
       "      <td>0.403</td>\n",
       "      <td>24.046</td>\n",
       "      <td>6.026</td>\n",
       "      <td>5.679</td>\n",
       "      <td>0.373</td>\n",
       "      <td>-0.857</td>\n",
       "      <td>76.376</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>49</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>黑</td>\n",
       "      <td>风化</td>\n",
       "      <td>32.212</td>\n",
       "      <td>0.036</td>\n",
       "      <td>-0.279</td>\n",
       "      <td>2.491</td>\n",
       "      <td>0.672</td>\n",
       "      <td>3.427</td>\n",
       "      <td>1.290</td>\n",
       "      <td>0.403</td>\n",
       "      <td>24.046</td>\n",
       "      <td>6.026</td>\n",
       "      <td>5.679</td>\n",
       "      <td>0.373</td>\n",
       "      <td>-0.857</td>\n",
       "      <td>76.376</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>50</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>黑</td>\n",
       "      <td>风化</td>\n",
       "      <td>32.212</td>\n",
       "      <td>0.036</td>\n",
       "      <td>-0.279</td>\n",
       "      <td>2.491</td>\n",
       "      <td>0.672</td>\n",
       "      <td>3.427</td>\n",
       "      <td>1.290</td>\n",
       "      <td>0.403</td>\n",
       "      <td>24.046</td>\n",
       "      <td>6.026</td>\n",
       "      <td>5.679</td>\n",
       "      <td>0.373</td>\n",
       "      <td>-0.857</td>\n",
       "      <td>76.376</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>50</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>黑</td>\n",
       "      <td>风化</td>\n",
       "      <td>32.212</td>\n",
       "      <td>0.036</td>\n",
       "      <td>-0.279</td>\n",
       "      <td>2.491</td>\n",
       "      <td>0.672</td>\n",
       "      <td>3.427</td>\n",
       "      <td>1.290</td>\n",
       "      <td>0.403</td>\n",
       "      <td>24.046</td>\n",
       "      <td>6.026</td>\n",
       "      <td>5.679</td>\n",
       "      <td>0.373</td>\n",
       "      <td>-0.857</td>\n",
       "      <td>76.376</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>51</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>23.153</td>\n",
       "      <td>0.689</td>\n",
       "      <td>0.437</td>\n",
       "      <td>2.537</td>\n",
       "      <td>0.374</td>\n",
       "      <td>2.041</td>\n",
       "      <td>0.677</td>\n",
       "      <td>1.479</td>\n",
       "      <td>35.332</td>\n",
       "      <td>5.991</td>\n",
       "      <td>4.034</td>\n",
       "      <td>0.366</td>\n",
       "      <td>-0.777</td>\n",
       "      <td>77.110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>51</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>23.153</td>\n",
       "      <td>0.689</td>\n",
       "      <td>0.437</td>\n",
       "      <td>2.537</td>\n",
       "      <td>0.374</td>\n",
       "      <td>2.041</td>\n",
       "      <td>0.677</td>\n",
       "      <td>1.479</td>\n",
       "      <td>35.332</td>\n",
       "      <td>5.991</td>\n",
       "      <td>4.034</td>\n",
       "      <td>0.366</td>\n",
       "      <td>-0.777</td>\n",
       "      <td>77.110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>52</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>23.153</td>\n",
       "      <td>0.689</td>\n",
       "      <td>0.437</td>\n",
       "      <td>2.537</td>\n",
       "      <td>0.374</td>\n",
       "      <td>2.041</td>\n",
       "      <td>0.677</td>\n",
       "      <td>1.479</td>\n",
       "      <td>35.332</td>\n",
       "      <td>5.991</td>\n",
       "      <td>4.034</td>\n",
       "      <td>0.366</td>\n",
       "      <td>-0.777</td>\n",
       "      <td>77.110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>53</td>\n",
       "      <td>A</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>40.948</td>\n",
       "      <td>1.809</td>\n",
       "      <td>-0.377</td>\n",
       "      <td>0.898</td>\n",
       "      <td>0.835</td>\n",
       "      <td>5.684</td>\n",
       "      <td>0.867</td>\n",
       "      <td>1.183</td>\n",
       "      <td>18.350</td>\n",
       "      <td>6.491</td>\n",
       "      <td>1.501</td>\n",
       "      <td>0.276</td>\n",
       "      <td>-0.458</td>\n",
       "      <td>78.465</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>54</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>23.153</td>\n",
       "      <td>0.689</td>\n",
       "      <td>0.437</td>\n",
       "      <td>2.537</td>\n",
       "      <td>0.374</td>\n",
       "      <td>2.041</td>\n",
       "      <td>0.677</td>\n",
       "      <td>1.479</td>\n",
       "      <td>35.332</td>\n",
       "      <td>5.991</td>\n",
       "      <td>4.034</td>\n",
       "      <td>0.366</td>\n",
       "      <td>-0.777</td>\n",
       "      <td>77.110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>54</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>23.153</td>\n",
       "      <td>0.689</td>\n",
       "      <td>0.437</td>\n",
       "      <td>2.537</td>\n",
       "      <td>0.374</td>\n",
       "      <td>2.041</td>\n",
       "      <td>0.677</td>\n",
       "      <td>1.479</td>\n",
       "      <td>35.332</td>\n",
       "      <td>5.991</td>\n",
       "      <td>4.034</td>\n",
       "      <td>0.366</td>\n",
       "      <td>-0.777</td>\n",
       "      <td>77.110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>56</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>19.457</td>\n",
       "      <td>0.031</td>\n",
       "      <td>-1.679</td>\n",
       "      <td>1.227</td>\n",
       "      <td>0.197</td>\n",
       "      <td>-0.494</td>\n",
       "      <td>0.989</td>\n",
       "      <td>1.852</td>\n",
       "      <td>40.137</td>\n",
       "      <td>10.564</td>\n",
       "      <td>2.822</td>\n",
       "      <td>0.256</td>\n",
       "      <td>-0.718</td>\n",
       "      <td>75.359</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>57</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>蓝绿</td>\n",
       "      <td>风化</td>\n",
       "      <td>19.457</td>\n",
       "      <td>0.031</td>\n",
       "      <td>-1.679</td>\n",
       "      <td>1.227</td>\n",
       "      <td>0.197</td>\n",
       "      <td>-0.494</td>\n",
       "      <td>0.989</td>\n",
       "      <td>1.852</td>\n",
       "      <td>40.137</td>\n",
       "      <td>10.564</td>\n",
       "      <td>2.822</td>\n",
       "      <td>0.256</td>\n",
       "      <td>-0.718</td>\n",
       "      <td>75.359</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>58</td>\n",
       "      <td>C</td>\n",
       "      <td>铅钡</td>\n",
       "      <td>浅蓝</td>\n",
       "      <td>风化</td>\n",
       "      <td>23.153</td>\n",
       "      <td>0.689</td>\n",
       "      <td>0.437</td>\n",
       "      <td>2.537</td>\n",
       "      <td>0.374</td>\n",
       "      <td>2.041</td>\n",
       "      <td>0.677</td>\n",
       "      <td>1.479</td>\n",
       "      <td>35.332</td>\n",
       "      <td>5.991</td>\n",
       "      <td>4.034</td>\n",
       "      <td>0.366</td>\n",
       "      <td>-0.777</td>\n",
       "      <td>77.110</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    文物编号 纹饰  类型  颜色 表面风化  二氧化硅(SiO2)  氧化钠(Na2O)  氧化钾(K2O)  氧化钙(CaO)  氧化镁(MgO)  \\\n",
       "0      2  A  铅钡  浅蓝   风化      40.948      1.809    -0.377     0.898     0.835   \n",
       "1      7  B  高钾  蓝绿   风化      89.575     -0.074     0.190     0.120    -0.051   \n",
       "2      8  C  铅钡   紫   风化      13.885     -0.010    -0.368     1.312    -0.007   \n",
       "3      8  C  铅钡   紫   风化      13.885     -0.010    -0.368     1.312    -0.007   \n",
       "4      9  B  高钾  蓝绿   风化      89.575     -0.074     0.190     0.120    -0.051   \n",
       "5     10  B  高钾  蓝绿   风化      89.575     -0.074     0.190     0.120    -0.051   \n",
       "6     11  C  铅钡  浅蓝   风化      23.153      0.689     0.437     2.537     0.374   \n",
       "7     12  B  高钾  蓝绿   风化      89.575     -0.074     0.190     0.120    -0.051   \n",
       "8     19  A  铅钡  浅蓝   风化      40.948      1.809    -0.377     0.898     0.835   \n",
       "9     22  B  高钾  蓝绿   风化      89.575     -0.074     0.190     0.120    -0.051   \n",
       "10    23  A  铅钡  蓝绿   风化      37.252      1.151    -2.493    -0.412     0.658   \n",
       "11    25  C  铅钡  浅蓝   风化      23.153      0.689     0.437     2.537     0.374   \n",
       "12    26  C  铅钡   紫   风化      13.885     -0.010    -0.368     1.312    -0.007   \n",
       "13    26  C  铅钡   紫   风化      13.885     -0.010    -0.368     1.312    -0.007   \n",
       "14    27  B  高钾  蓝绿   风化      89.575     -0.074     0.190     0.120    -0.051   \n",
       "15    28  A  铅钡  浅蓝   风化      40.948      1.809    -0.377     0.898     0.835   \n",
       "16    29  A  铅钡  浅蓝   风化      40.948      1.809    -0.377     0.898     0.835   \n",
       "17    34  C  铅钡  深绿   风化      33.396      0.914    -0.064     0.641     0.027   \n",
       "18    36  C  铅钡  深绿   风化      33.396      0.914    -0.064     0.641     0.027   \n",
       "19    38  C  铅钡  深绿   风化      33.396      0.914    -0.064     0.641     0.027   \n",
       "20    39  C  铅钡  深绿   风化      33.396      0.914    -0.064     0.641     0.027   \n",
       "21    40  C  铅钡  浅蓝   风化      23.153      0.689     0.437     2.537     0.374   \n",
       "22    41  C  铅钡  浅绿   风化      34.814      0.070    -0.299     1.579     0.848   \n",
       "23    42  A  铅钡  浅蓝   风化      40.948      1.809    -0.377     0.898     0.835   \n",
       "24    42  A  铅钡  浅蓝   风化      40.948      1.809    -0.377     0.898     0.835   \n",
       "25    43  C  铅钡  浅蓝   风化      23.153      0.689     0.437     2.537     0.374   \n",
       "26    43  C  铅钡  浅蓝   风化      23.153      0.689     0.437     2.537     0.374   \n",
       "27    44  A  铅钡  浅蓝   风化      40.948      1.809    -0.377     0.898     0.835   \n",
       "28    48  A  铅钡  浅蓝   风化      40.948      1.809    -0.377     0.898     0.835   \n",
       "29    49  A  铅钡   黑   风化      32.212      0.036    -0.279     2.491     0.672   \n",
       "30    49  A  铅钡   黑   风化      32.212      0.036    -0.279     2.491     0.672   \n",
       "31    50  A  铅钡   黑   风化      32.212      0.036    -0.279     2.491     0.672   \n",
       "32    50  A  铅钡   黑   风化      32.212      0.036    -0.279     2.491     0.672   \n",
       "33    51  C  铅钡  浅蓝   风化      23.153      0.689     0.437     2.537     0.374   \n",
       "34    51  C  铅钡  浅蓝   风化      23.153      0.689     0.437     2.537     0.374   \n",
       "35    52  C  铅钡  浅蓝   风化      23.153      0.689     0.437     2.537     0.374   \n",
       "36    53  A  铅钡  浅蓝   风化      40.948      1.809    -0.377     0.898     0.835   \n",
       "37    54  C  铅钡  浅蓝   风化      23.153      0.689     0.437     2.537     0.374   \n",
       "38    54  C  铅钡  浅蓝   风化      23.153      0.689     0.437     2.537     0.374   \n",
       "39    56  C  铅钡  蓝绿   风化      19.457      0.031    -1.679     1.227     0.197   \n",
       "40    57  C  铅钡  蓝绿   风化      19.457      0.031    -1.679     1.227     0.197   \n",
       "41    58  C  铅钡  浅蓝   风化      23.153      0.689     0.437     2.537     0.374   \n",
       "\n",
       "    氧化铝(Al2O3)  氧化铁(Fe2O3)  氧化铜(CuO)  氧化铅(PbO)  氧化钡(BaO)  五氧化二磷(P2O5)  \\\n",
       "0        5.684       0.867     1.183    18.350     6.491        1.501   \n",
       "1        0.879       0.621     1.218    -8.907    -1.651       -1.066   \n",
       "2        0.661       0.838     5.789    22.977    25.273        3.022   \n",
       "3        0.661       0.838     5.789    22.977    25.273        3.022   \n",
       "4        0.879       0.621     1.218    -8.907    -1.651       -1.066   \n",
       "5        0.879       0.621     1.218    -8.907    -1.651       -1.066   \n",
       "6        2.041       0.677     1.479    35.332     5.991        4.034   \n",
       "7        0.879       0.621     1.218    -8.907    -1.651       -1.066   \n",
       "8        5.684       0.867     1.183    18.350     6.491        1.501   \n",
       "9        0.879       0.621     1.218    -8.907    -1.651       -1.066   \n",
       "10       3.149       1.179     1.556    23.155    11.064        0.289   \n",
       "11       2.041       0.677     1.479    35.332     5.991        4.034   \n",
       "12       0.661       0.838     5.789    22.977    25.273        3.022   \n",
       "13       0.661       0.838     5.789    22.977    25.273        3.022   \n",
       "14       0.879       0.621     1.218    -8.907    -1.651       -1.066   \n",
       "15       5.684       0.867     1.183    18.350     6.491        1.501   \n",
       "16       5.684       0.867     1.183    18.350     6.491        1.501   \n",
       "17       1.622       0.240     0.676    33.335     7.620       -0.053   \n",
       "18       1.622       0.240     0.676    33.335     7.620       -0.053   \n",
       "19       1.622       0.240     0.676    33.335     7.620       -0.053   \n",
       "20       1.622       0.240     0.676    33.335     7.620       -0.053   \n",
       "21       2.041       0.677     1.479    35.332     5.991        4.034   \n",
       "22       1.740       0.889    -0.133    28.081     5.904        2.714   \n",
       "23       5.684       0.867     1.183    18.350     6.491        1.501   \n",
       "24       5.684       0.867     1.183    18.350     6.491        1.501   \n",
       "25       2.041       0.677     1.479    35.332     5.991        4.034   \n",
       "26       2.041       0.677     1.479    35.332     5.991        4.034   \n",
       "27       5.684       0.867     1.183    18.350     6.491        1.501   \n",
       "28       5.684       0.867     1.183    18.350     6.491        1.501   \n",
       "29       3.427       1.290     0.403    24.046     6.026        5.679   \n",
       "30       3.427       1.290     0.403    24.046     6.026        5.679   \n",
       "31       3.427       1.290     0.403    24.046     6.026        5.679   \n",
       "32       3.427       1.290     0.403    24.046     6.026        5.679   \n",
       "33       2.041       0.677     1.479    35.332     5.991        4.034   \n",
       "34       2.041       0.677     1.479    35.332     5.991        4.034   \n",
       "35       2.041       0.677     1.479    35.332     5.991        4.034   \n",
       "36       5.684       0.867     1.183    18.350     6.491        1.501   \n",
       "37       2.041       0.677     1.479    35.332     5.991        4.034   \n",
       "38       2.041       0.677     1.479    35.332     5.991        4.034   \n",
       "39      -0.494       0.989     1.852    40.137    10.564        2.822   \n",
       "40      -0.494       0.989     1.852    40.137    10.564        2.822   \n",
       "41       2.041       0.677     1.479    35.332     5.991        4.034   \n",
       "\n",
       "    氧化锶(SrO)  二氧化硫(SO2)     sum  \n",
       "0      0.276     -0.458  78.465  \n",
       "1     -0.040     -0.857  80.814  \n",
       "2      0.495      5.522  73.867  \n",
       "3      0.495      5.522  73.867  \n",
       "4     -0.040     -0.857  80.814  \n",
       "5     -0.040     -0.857  80.814  \n",
       "6      0.366     -0.777  77.110  \n",
       "7     -0.040     -0.857  80.814  \n",
       "8      0.276     -0.458  78.465  \n",
       "9     -0.040     -0.857  80.814  \n",
       "10     0.166     -0.399  76.714  \n",
       "11     0.366     -0.777  77.110  \n",
       "12     0.495      5.522  73.867  \n",
       "13     0.495      5.522  73.867  \n",
       "14    -0.040     -0.857  80.814  \n",
       "15     0.276     -0.458  78.465  \n",
       "16     0.276     -0.458  78.465  \n",
       "17     0.250      0.110  78.604  \n",
       "18     0.250      0.110  78.604  \n",
       "19     0.250      0.110  78.604  \n",
       "20     0.250      0.110  78.604  \n",
       "21     0.366     -0.777  77.110  \n",
       "22     0.126      0.062  76.333  \n",
       "23     0.276     -0.458  78.465  \n",
       "24     0.276     -0.458  78.465  \n",
       "25     0.366     -0.777  77.110  \n",
       "26     0.366     -0.777  77.110  \n",
       "27     0.276     -0.458  78.465  \n",
       "28     0.276     -0.458  78.465  \n",
       "29     0.373     -0.857  76.376  \n",
       "30     0.373     -0.857  76.376  \n",
       "31     0.373     -0.857  76.376  \n",
       "32     0.373     -0.857  76.376  \n",
       "33     0.366     -0.777  77.110  \n",
       "34     0.366     -0.777  77.110  \n",
       "35     0.366     -0.777  77.110  \n",
       "36     0.276     -0.458  78.465  \n",
       "37     0.366     -0.777  77.110  \n",
       "38     0.366     -0.777  77.110  \n",
       "39     0.256     -0.718  75.359  \n",
       "40     0.256     -0.718  75.359  \n",
       "41     0.366     -0.777  77.110  "
      ]
     },
     "execution_count": 157,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X1  # 此时存在负数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d364757f-35ce-4b13-8542-5b92fb63bfbd",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (Bundle)",
   "language": "python",
   "name": "pyb"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
